From e3859a81448b481ad33518455d20fb76acbde84d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Aug 2013 09:08:49 +0200 Subject: [PATCH 001/163] Raise version number after cloning 5.5.34 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 26414adb678..3a42bb0f600 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 -MYSQL_VERSION_PATCH=34 +MYSQL_VERSION_PATCH=35 MYSQL_VERSION_EXTRA= From 277697b81f5a3856a0fc7c7282810590cf0e5346 Mon Sep 17 00:00:00 2001 From: Neeraj Bisht Date: Wed, 28 Aug 2013 14:54:53 +0530 Subject: [PATCH 002/163] Bug#16346241 - SERVER CRASH IN ITEM_PARAM::QUERY_VAL_STR Problem:- Second execution of prepared statement for query with parameter in limit clause, causes an assert when using connectors (e.g., Connector C). Analysis:- In prepared statement, LIMIT parameters can be specified using '?' markers. Value for the parameter can be supplied while executing the prepared statement. Passing string, float or double values for LIMIT clause works well from command-line client. That's because, while setting the LIMIT parameter value from a user-variable, the value is converted to integer value. However, when prepared statement is executed from other interfaces as J connectors, or C applications etc, the value for the parameters are sent to the server with execute command. Each item in command has value and the data TYPE. So, while setting parameter values from this log, value is set to all the parameters with the same data type as passed. Here, we have the logic to convert the value to change the state and item_type if it is part of LIMIT parameter and its item_type is not INT. But when we reset this parameter we save the item_type but change state. So on second execution we have old item_type but our state has been changed, which make us to use string type variable in Item_param::query_str_val(). This cause an assert. Fix: Instead of checking the item_type of the parameter, check for the state of the parameter. As state value are reset everytime we execute the statement. --- sql/sql_prepare.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 74279c5539d..48d23cd5d21 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -877,7 +877,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 && param->item_type != Item::INT_ITEM) + 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; From 881e61db72e568ef0b55bc36d710c650abccfa85 Mon Sep 17 00:00:00 2001 From: Raghav Kapoor Date: Wed, 28 Aug 2013 15:17:46 +0530 Subject: [PATCH 003/163] BUG#17294150-POTENTIAL CRASH DUE TO BUFFER OVERRUN IN SSL ERROR HANDLING CODE BACKGROUND: There can be a potential crash due to buffer overrun in SSL error handling code due to missing comma in ssl_error_string[] array in viosslfactories.c. ANALYSIS: Found by code Inspection. FIX: Added the missing comma in SSL error handling code in ssl_error_string[] array in viosslfactories.c. --- vio/viosslfactories.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 5d31d1dde56..9f689bf7c86 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -80,7 +80,7 @@ ssl_error_string[] = "No error", "Unable to get certificate", "Unable to get private key", - "Private key does not match the certificate public key" + "Private key does not match the certificate public key", "SSL_CTX_set_default_verify_paths failed", "Failed to set ciphers to use", "SSL_CTX_new failed" From 095b6645b0eba758ab258ca9587da7e0edd34f16 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Thu, 29 Aug 2013 14:42:55 +0200 Subject: [PATCH 004/163] Fix for Bug#17377159, ignore mysqld_safe.pid file created by mysqld_safe script --- support-files/mysql.spec.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 2d8aa78464b..bcd66b96c2b 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -643,7 +643,7 @@ then fi if [ -z "$PID_FILE_PATT" ] then - PID_FILE_PATT="$mysql_datadir/*.pid" + PID_FILE_PATT=`ls $mysql_datadir/*.pid 2>/dev/null | grep -v "mysqld_safe.pid"` fi # Check if we can safely upgrade. An upgrade is only safe if it's from one @@ -1194,6 +1194,9 @@ fi # merging BK trees) ############################################################################## %changelog +* Thu Aug 29 2013 Balasubramanian Kandasamy +- Added logic to ignore mysqld_safe.pid file created by mysqld_safe script + * Tue Sep 11 2012 Joerg Bruehe - Disable "maintainer mode" in debug builds, there is a cast ulonglong -> int From 9e49de009c2ce2523c3c50effb049fc98825e71c Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Fri, 30 Aug 2013 17:14:46 +0200 Subject: [PATCH 005/163] Fix to ignore mysqld_safe.pid --- support-files/mysql.spec.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index bcd66b96c2b..ea6eddd7279 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -643,7 +643,7 @@ then fi if [ -z "$PID_FILE_PATT" ] then - PID_FILE_PATT=`ls $mysql_datadir/*.pid 2>/dev/null | grep -v "mysqld_safe.pid"` + PID_FILE_PATT="$mysql_datadir/*.pid" fi # Check if we can safely upgrade. An upgrade is only safe if it's from one @@ -716,7 +716,7 @@ fi # We assume that if there is exactly one ".pid" file, # it contains the valid PID of a running MySQL server. -NR_PID_FILES=`ls $PID_FILE_PATT 2>/dev/null | wc -l` +NR_PID_FILES=`ls $PID_FILE_PATT 2>/dev/null | grep -v "mysqld_safe.pid" | wc -l` case $NR_PID_FILES in 0 ) SERVER_TO_START='' ;; # No "*.pid" file == no running server 1 ) SERVER_TO_START='true' ;; From 28959a5661d14de784ab8b369613511727200811 Mon Sep 17 00:00:00 2001 From: Igor Solodovnikov Date: Fri, 30 Aug 2013 20:05:37 +0300 Subject: [PATCH 006/163] Bug #17297012 MEMORY LEAK IN MYSQL_OPTIONS WHILE CALLING WITH OPTION MYSQL_SET_CLIENT_IP Memory Leak in mysql_options() was caused by missing call to my_free() in MYSQL_SET_CLIENT_IP branch. Fixed by adding my_free() to cleanup mysql->options.client_ip value before assigning new value. --- sql-common/client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql-common/client.c b/sql-common/client.c index 51911d913c7..7ee0eabe0ef 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2003, 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 @@ -3167,6 +3167,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) mysql->options.methods_to_use= option; break; case MYSQL_SET_CLIENT_IP: + my_free(mysql->options.client_ip,MYF(MY_ALLOW_ZERO_PTR)); mysql->options.client_ip= my_strdup(arg, MYF(MY_WME)); break; case MYSQL_SECURE_AUTH: From ee15c1fd5fcbbed3293d564c29e672de02b55b65 Mon Sep 17 00:00:00 2001 From: Igor Solodovnikov Date: Fri, 30 Aug 2013 20:22:09 +0300 Subject: [PATCH 007/163] Bug #17297012 MEMORY LEAK IN MYSQL_OPTIONS WHILE CALLING WITH OPTION MYSQL_SET_CLIENT_IP Memory Leak in mysql_options() was caused by missing call to my_free() in MYSQL_SET_CLIENT_IP branch. Fixed by adding my_free() to cleanup mysql->options.client_ip value before assigning new value. --- sql-common/client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sql-common/client.c b/sql-common/client.c index 1e98eadda28..16a61d7f53d 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -4151,6 +4151,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) mysql->options.methods_to_use= option; break; case MYSQL_SET_CLIENT_IP: + my_free(mysql->options.client_ip); mysql->options.client_ip= my_strdup(arg, MYF(MY_WME)); break; case MYSQL_SECURE_AUTH: From 8054e052a5eb56fde7fcc89564ca22117058af3d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Sep 2013 18:51:52 +0530 Subject: [PATCH 008/163] From a752639714e15f3843b0570c0f2ff95c3cf3df0e Mon Sep 17 00:00:00 2001 From: Arun Kuruvila Date: Mon, 2 Sep 2013 14:53:45 +0530 Subject: [PATCH 009/163] Bug #17168602 MYSQL_PLUGIN REMOVES NON-DIRECTORY TYPE FILES SPECIFIED WITH THE BASEDIR OPTION Description: The mysql_plugin client attempts to remove any filename specified to the --basedir option. The problem is that if the filename does not end with a slash, it will attempt to unlink it, which succeeds for files, but not for directories. Analysis: When we are starting mysql_plugin with basedir option and if we are giving path of a file as basedir, it deletes that file. It was because it uses a function my_delete which unlinks the file path given. Fix: As a fix we replace that line using another function my_free, which will only free the pointer which is having that file path. --- client/mysql_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c index 72bab3ad528..7fbfeb9e9a6 100644 --- a/client/mysql_plugin.c +++ b/client/mysql_plugin.c @@ -856,7 +856,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)); } } From 0daae54fb541e806b521e8b6db9d14d83af48136 Mon Sep 17 00:00:00 2001 From: Hery Ramilison Date: Tue, 3 Sep 2013 18:37:46 +0200 Subject: [PATCH 010/163] Fixing sles11 build that /usr/lib/mysql/plugin is not owned by a package --- support-files/mysql.spec.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index ea6eddd7279..9560eeea53a 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1025,6 +1025,7 @@ fi %attr(755, root, root) %{_sbindir}/mysqld-debug %attr(755, root, root) %{_sbindir}/mysqlmanager %attr(755, root, root) %{_sbindir}/rcmysql +%attr(755, root, root) %{_libdir}/mysql/plugin %if %{INNODB_BUILD} %if %{WITH_INNODB_PLUGIN} %attr(755, root, root) %{_libdir}/mysql/plugin/ha_innodb_plugin.so* From e203951cb1e42404ed62abbfe7eb6e4cce53218c Mon Sep 17 00:00:00 2001 From: Neeraj Bisht Date: Wed, 4 Sep 2013 10:45:55 +0530 Subject: [PATCH 011/163] Bug#17222452 - SELECT COUNT(DISTINCT A,B) INCORRECTLY COUNTS ROWS CONTAINING NULL Problem:- In MySQL, We can obtain the number of distinct expression combinations that do not contain NULL by giving a list of expressions in COUNT(DISTINCT). However rows with NULL values are incorrectly included in the count when loose index scan is used. Analysis:- In case of loose index scan, we check whether the field is null or not and increase the count in Item_sum_count::add(). But there we are checking for the first field in COUNT(DISTINCT), not for every field. This is causing an incorrect result. Solution:- Check all field in Item_sum_count::add(), whether there values are null or not. Then only increment the count. ****** Bug#17222452 - SELECT COUNT(DISTINCT A,B) INCORRECTLY COUNTS ROWS CONTAINING NULL Problem:- In MySQL, We can obtain the number of distinct expression combinations that do not contain NULL by giving a list of expressions in COUNT(DISTINCT). However rows with NULL values are incorrectly included in the count when loose index scan is used. Analysis:- In case of loose index scan, we check whether the field is null or not and increase the count in Item_sum_count::add(). But there we are checking for the first field in COUNT(DISTINCT), not for every field. This is causing an incorrect result. Solution:- Check all field in Item_sum_count::add(), whether there values are null or not. Then only increment the count. --- sql/item_sum.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sql/item_sum.cc b/sql/item_sum.cc index e194907fa06..3fbbc1b811a 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1496,8 +1496,12 @@ void Item_sum_count::clear() bool Item_sum_count::add() { - if (!args[0]->maybe_null || !args[0]->is_null()) - count++; + for (uint i=0; imaybe_null && args[i]->is_null()) + return 0; + } + count++; return 0; } From 14976fbe8a5d9e88cba6474808b8b59790e84c3e Mon Sep 17 00:00:00 2001 From: Nisha Gopalakrishnan Date: Thu, 5 Sep 2013 13:40:27 +0530 Subject: [PATCH 012/163] BUG#16032946 - PLEASE GIVE A MESSAGE FOR "THREAD_CONCURRENCY DOESN'T DO WHAT YOU EXPECT" Fix info: -------- Backport of the deprecation bug fix (WL#5265) for global variable 'THREAD_CONCURRENCY' from mysql-5.6 to mysql-5.5 Note: With this backport, certain additional deprecation warnings would be reported under error conditions while setting the global/session variables. --- sql/set_var.cc | 2 +- sql/set_var.h | 3 ++- sql/sys_vars.cc | 10 +++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sql/set_var.cc b/sql/set_var.cc index 75387b974f1..82ea8298a66 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -217,7 +217,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))) { @@ -593,6 +592,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"); diff --git a/sql/set_var.h b/sql/set_var.h index 01e3be11621..60164ba0363 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -143,6 +143,7 @@ public: return (option.id != -1) && (m_parse_flag & parse_flags) && insert_dynamic(array, (uchar*)&option); } + void do_deprecated_warning(THD *thd); private: virtual bool do_check(THD *thd, set_var *var) = 0; @@ -156,7 +157,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. diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 1d0f9691629..63f478be5f0 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 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 @@ -1797,9 +1797,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_ulong Sys_thread_stack( "thread_stack", "The stack size for each thread", From b0915e6abdd607fc666025ca57aef615b4816864 Mon Sep 17 00:00:00 2001 From: Venkata Sidagam Date: Thu, 5 Sep 2013 14:18:43 +0530 Subject: [PATCH 013/163] Bug #17168602 MYSQL_PLUGIN REMOVES NON-DIRECTORY TYPE FILES SPECIFIED WITH THE BASEDIR OPTION Reverting the patch. Because asked for second review. --- client/mysql_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c index 7fbfeb9e9a6..72bab3ad528 100644 --- a/client/mysql_plugin.c +++ b/client/mysql_plugin.c @@ -856,7 +856,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_free(opt_basedir); + my_delete(opt_basedir, MYF(0)); opt_basedir= my_strdup(buff, MYF(MY_FAE)); } } From 7b5e90b4dd7e5be7552f75fbc7e2c89b2fd63260 Mon Sep 17 00:00:00 2001 From: Raghav Kapoor Date: Fri, 6 Sep 2013 12:38:11 +0530 Subject: [PATCH 014/163] Post push fix of openssl_1.test failure --- mysql-test/r/openssl_1.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index b6efab9c055..2a3eeacab3b 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -83,7 +83,7 @@ Ssl_cipher AES128-SHA SHOW STATUS LIKE 'Ssl_cipher'; Variable_name Value Ssl_cipher AES128-SHA -mysqltest: Could not open connection 'default': 2026 SSL connection error: SSL_CTX_new failed +mysqltest: Could not open connection 'default': 2026 SSL connection error: Failed to set ciphers to use CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); From 28278b141009a44957986bba8f553040dffb1373 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Mon, 9 Sep 2013 12:43:08 +0200 Subject: [PATCH 015/163] Bug#16870783 RECENT REGRESSION: CRASH WITH GROUP_CONCAT AND INVALID SEPARATOR Add missing initialization in lex_start() --- sql/sql_lex.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index bc313ed0486..9113f31c76c 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -411,6 +411,7 @@ 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->duplicates= DUP_ERROR; lex->ignore= 0; lex->spname= NULL; From 27c6c4e8ac690b3619b7ee2f8582b015e42ce346 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Mon, 9 Sep 2013 14:20:50 +0200 Subject: [PATCH 016/163] Bug#17296644 CONV(X, INT_MIN, INT_MIN) SEGFAULTS THE SERVER Do not call abs(INT_MIN) as the result is undefined. --- configure.cmake | 4 ++++ sql/item_strfunc.cc | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.cmake b/configure.cmake index 3474f12f1e1..c3ac3a8222f 100644 --- a/configure.cmake +++ b/configure.cmake @@ -147,6 +147,10 @@ IF(UNIX) SET(CMAKE_REQUIRED_LIBRARIES ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT}) + # 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() LIST(LENGTH CMAKE_REQUIRED_LIBRARIES required_libs_length) IF(${required_libs_length} GREATER 0) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index f654d260564..363ca02fd7a 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1,5 +1,5 @@ /* - 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 @@ -2928,7 +2928,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())) { From 044a7d7c2f2c13f1649d02b69de93c85edd3fdf2 Mon Sep 17 00:00:00 2001 From: Venkata Sidagam Date: Mon, 9 Sep 2013 20:32:50 +0530 Subject: [PATCH 017/163] Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY Reverting the patch. Because this change is not to me made for GA versions. --- scripts/mysqld_safe.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index f3759cbbf6b..48c98f2fde3 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -343,32 +343,6 @@ fi parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld` parse_arguments PICK-ARGS-FROM-ARGV "$@" -# A pid file is created for the mysqld_safe process. This file protects the -# server instance resources during race conditions. -safe_pid="$DATADIR/mysqld_safe.pid" -if test -f $safe_pid -then - PID=`cat "$safe_pid"` - if @CHECK_PID@ - then - if @FIND_PROC@ - then - log_error "A mysqld_safe process already exists" - exit 1 - fi - fi - rm -f "$safe_pid" - if test -f "$safe_pid" - then - log_error "Fatal error: Can't remove the mysqld_safe pid file" - exit 1 - fi -fi - -# Insert pid proerply into the pid file. -ps -e | grep [m]ysqld_safe | awk '{print $1}' | sed -n 1p > $safe_pid -# End of mysqld_safe pid(safe_pid) check. - # Determine what logging facility to use # Ensure that 'logger' exists, if it's requested @@ -378,7 +352,6 @@ then if [ $? -ne 0 ] then log_error "--syslog requested, but no 'logger' program found. Please ensure that 'logger' is in your PATH, or do not specify the --syslog option to mysqld_safe." - rm -f "$safe_pid" # Clean Up of mysqld_safe.pid file. exit 1 fi fi @@ -483,7 +456,6 @@ does not exist or is not executable. Please cd to the mysql installation directory and restart this script from there as follows: ./bin/mysqld_safe& See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information" - rm -f "$safe_pid" # Clean Up of mysqld_safe.pid file. exit 1 fi @@ -577,7 +549,6 @@ then if @FIND_PROC@ then # The pid contains a mysqld process log_error "A mysqld process already exists" - rm -f "$safe_pid" # Clean Up of mysqld_safe.pid file. exit 1 fi fi @@ -588,7 +559,6 @@ then $pid_file Please remove it manually and start $0 again; mysqld daemon not started" - rm -f "$safe_pid" # Clean Up of mysqld_safe.pid file. exit 1 fi fi @@ -674,5 +644,3 @@ done log_notice "mysqld from pid file $pid_file ended" -rm -f "$safe_pid" # Some Extra Safety. File is deleted - # once the mysqld process ends. From 199a98ee28a01c6f378cf4a9d6940376862c4f6f Mon Sep 17 00:00:00 2001 From: Hery Ramilison Date: Mon, 9 Sep 2013 18:58:08 +0200 Subject: [PATCH 018/163] Committing patch from venkata.sidagam@oracle.com for Bug#16776528 --- scripts/mysqld_safe.sh | 32 -------------------------------- support-files/mysql.spec.sh | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index f3759cbbf6b..48c98f2fde3 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -343,32 +343,6 @@ fi parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld` parse_arguments PICK-ARGS-FROM-ARGV "$@" -# A pid file is created for the mysqld_safe process. This file protects the -# server instance resources during race conditions. -safe_pid="$DATADIR/mysqld_safe.pid" -if test -f $safe_pid -then - PID=`cat "$safe_pid"` - if @CHECK_PID@ - then - if @FIND_PROC@ - then - log_error "A mysqld_safe process already exists" - exit 1 - fi - fi - rm -f "$safe_pid" - if test -f "$safe_pid" - then - log_error "Fatal error: Can't remove the mysqld_safe pid file" - exit 1 - fi -fi - -# Insert pid proerply into the pid file. -ps -e | grep [m]ysqld_safe | awk '{print $1}' | sed -n 1p > $safe_pid -# End of mysqld_safe pid(safe_pid) check. - # Determine what logging facility to use # Ensure that 'logger' exists, if it's requested @@ -378,7 +352,6 @@ then if [ $? -ne 0 ] then log_error "--syslog requested, but no 'logger' program found. Please ensure that 'logger' is in your PATH, or do not specify the --syslog option to mysqld_safe." - rm -f "$safe_pid" # Clean Up of mysqld_safe.pid file. exit 1 fi fi @@ -483,7 +456,6 @@ does not exist or is not executable. Please cd to the mysql installation directory and restart this script from there as follows: ./bin/mysqld_safe& See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information" - rm -f "$safe_pid" # Clean Up of mysqld_safe.pid file. exit 1 fi @@ -577,7 +549,6 @@ then if @FIND_PROC@ then # The pid contains a mysqld process log_error "A mysqld process already exists" - rm -f "$safe_pid" # Clean Up of mysqld_safe.pid file. exit 1 fi fi @@ -588,7 +559,6 @@ then $pid_file Please remove it manually and start $0 again; mysqld daemon not started" - rm -f "$safe_pid" # Clean Up of mysqld_safe.pid file. exit 1 fi fi @@ -674,5 +644,3 @@ done log_notice "mysqld from pid file $pid_file ended" -rm -f "$safe_pid" # Some Extra Safety. File is deleted - # once the mysqld process ends. diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 9560eeea53a..93a74ac8445 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1025,9 +1025,9 @@ fi %attr(755, root, root) %{_sbindir}/mysqld-debug %attr(755, root, root) %{_sbindir}/mysqlmanager %attr(755, root, root) %{_sbindir}/rcmysql -%attr(755, root, root) %{_libdir}/mysql/plugin %if %{INNODB_BUILD} %if %{WITH_INNODB_PLUGIN} +%attr(755, root, root) %{_libdir}/mysql/plugin/ %attr(755, root, root) %{_libdir}/mysql/plugin/ha_innodb_plugin.so* %endif %endif From 07ffbdc2c93346479a5cc8257ed492efac77cd70 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Mon, 9 Sep 2013 20:07:12 +0200 Subject: [PATCH 019/163] Reverted the changes to spec file to ignore mysqld_safe.pid file, updated the logic to get the correct count of PID files --- support-files/mysql.spec.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 93a74ac8445..8fbf9f08b9e 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -716,7 +716,7 @@ fi # We assume that if there is exactly one ".pid" file, # it contains the valid PID of a running MySQL server. -NR_PID_FILES=`ls $PID_FILE_PATT 2>/dev/null | grep -v "mysqld_safe.pid" | wc -l` +NR_PID_FILES=`ls -1 $PID_FILE_PATT 2>/dev/null | wc -l` case $NR_PID_FILES in 0 ) SERVER_TO_START='' ;; # No "*.pid" file == no running server 1 ) SERVER_TO_START='true' ;; @@ -1195,8 +1195,8 @@ fi # merging BK trees) ############################################################################## %changelog -* Thu Aug 29 2013 Balasubramanian Kandasamy -- Added logic to ignore mysqld_safe.pid file created by mysqld_safe script +* Mon Sep 09 2013 Balasubramanian Kandasamy +- Updated logic to get the correct count of PID files * Tue Sep 11 2012 Joerg Bruehe From 514b8261b5404c0b4fecbd66fc6fa99ca1bd8c47 Mon Sep 17 00:00:00 2001 From: Libing Song Date: Tue, 10 Sep 2013 09:35:49 +0800 Subject: [PATCH 020/163] Bug#17402313 DUMP THREAD SENDS SOME EVENTS MORE THAN ONCE Dump thread may encounter an error when reading events from the active binlog file. However the errors may be temporary, so dump thread will try to read the event again. But dump thread seeked to an wrong position, it caused some events was sent twice. To fix the bug, prev_pos is defined out the while loop and is set the correct position after reading every event correctly. This patch also make binlog_can_be_corrupted more accurate, only the binlogs not closed normally are marked binlog_can_be_corrupted. Finally, two warnings are added when dump threads encounter the temporary errors. --- sql/log_event.cc | 11 +++++++++++ sql/sql_repl.cc | 51 ++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index 16388fbbef7..d7e912cfe1a 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1027,6 +1027,17 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet, if (log_file_name_arg) *is_binlog_active= mysql_bin_log.is_active(log_file_name_arg); + DBUG_EXECUTE_IF("dump_fake_io_error", + { + if (log_lock) + { + pthread_mutex_unlock(log_lock); + + DBUG_SET("-d,dump_fake_io_error"); + DBUG_RETURN(LOG_READ_IO); + } + }); + if (my_b_read(file, (uchar*) buf, sizeof(buf))) { /* diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 06c25c324c7..4da7c5851ba 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -360,6 +360,9 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, int left_events = max_binlog_dump_events; #endif int old_max_allowed_packet= thd->variables.max_allowed_packet; + bool is_active_binlog= false; + my_off_t prev_pos= pos; + DBUG_ENTER("mysql_binlog_send"); DBUG_PRINT("enter",("log_ident: '%s' pos: %ld", log_ident, (long) pos)); @@ -483,7 +486,8 @@ impossible position"; Try to find a Format_description_log_event at the beginning of the binlog */ - if (!(error = Log_event::read_log_event(&log, packet, log_lock))) + if (!(error = Log_event::read_log_event(&log, packet, log_lock, + log_file_name, &is_active_binlog))) { /* The packet has offsets equal to the normal offsets in a binlog @@ -494,8 +498,14 @@ impossible position"; (*packet)[EVENT_TYPE_OFFSET+1])); if ((*packet)[EVENT_TYPE_OFFSET+1] == FORMAT_DESCRIPTION_EVENT) { - binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+1] & - LOG_EVENT_BINLOG_IN_USE_F); + /* + If a binlog is not active, but LOG_EVENT_BINLOG_IN_USE_F + flag is 1. That means it is not closed in normal way + (E.g server crash) and may include corrupted events. + */ + binlog_can_be_corrupted= (!is_active_binlog) && + test((*packet)[FLAGS_OFFSET+1] & LOG_EVENT_BINLOG_IN_USE_F); + (*packet)[FLAGS_OFFSET+1] &= ~LOG_EVENT_BINLOG_IN_USE_F; /* mark that this event with "log_pos=0", so the slave @@ -547,12 +557,11 @@ impossible position"; while (!net->error && net->vio != 0 && !thd->killed) { - my_off_t prev_pos= pos; - bool is_active_binlog= false; while (!(error= Log_event::read_log_event(&log, packet, log_lock, log_file_name, &is_active_binlog))) { + DBUG_ASSERT(prev_pos < my_b_tell(&log)); prev_pos= my_b_tell(&log); #ifndef DBUG_OFF if (max_binlog_dump_events && !left_events--) @@ -580,8 +589,9 @@ impossible position"; if ((*packet)[EVENT_TYPE_OFFSET+1] == FORMAT_DESCRIPTION_EVENT) { - binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+1] & - LOG_EVENT_BINLOG_IN_USE_F); + binlog_can_be_corrupted= (!is_active_binlog) && + test((*packet)[FLAGS_OFFSET+1] & LOG_EVENT_BINLOG_IN_USE_F); + (*packet)[FLAGS_OFFSET+1] &= ~LOG_EVENT_BINLOG_IN_USE_F; } else if ((*packet)[EVENT_TYPE_OFFSET+1] == STOP_EVENT) @@ -620,9 +630,31 @@ impossible position"; here we were reading binlog that was not closed properly (as a result of a crash ?). treat any corruption as EOF */ - if (binlog_can_be_corrupted && + if ((binlog_can_be_corrupted || is_active_binlog) && error != LOG_READ_MEM && error != LOG_READ_EOF) { + test_for_non_eof_log_read_errors(error, &errmsg); + + if (is_active_binlog) + { + sql_print_warning("Failed to read an event from active binlog(%s,%lu). " + "error: %s. Dump thread will try to read it again.", + log_file_name, (ulong)prev_pos, errmsg); + } + else + { + sql_print_warning("Failed to read an event from inactive binlog" + "(%s, %lu). error: %s. Dump thread found the binlog " + "was not rotated correctly. It will jump to next " + "binlog directly.", + log_file_name, (ulong) prev_pos, errmsg); + } + errmsg= NULL; + + /* + If binlog is active, it will try to read the event again. Otherwise, + skip the corrupted events and switch to next binlog. + */ my_b_seek(&log, prev_pos); error=LOG_READ_EOF; } @@ -695,6 +727,8 @@ impossible position"; /* we read successfully, so we'll need to send it to the slave */ pthread_mutex_unlock(log_lock); read_packet = 1; + DBUG_ASSERT(prev_pos < my_b_tell(&log)); + prev_pos= my_b_tell(&log); break; case LOG_READ_EOF: @@ -757,6 +791,7 @@ impossible position"; thd_proc_info(thd, "Finished reading one binlog; switching to next binlog"); switch (mysql_bin_log.find_next_log(&linfo, 1)) { case 0: + prev_pos= BIN_LOG_HEADER_SIZE; break; case LOG_INFO_EOF: if (mysql_bin_log.is_active(log_file_name)) From 1ba0dac57444ef0422d9ff13bd584c525959b840 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 10 Sep 2013 07:25:01 +0200 Subject: [PATCH 021/163] MTR: fix broken logic for ignoring missing ctest in Pushbuild --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 19f82303221..54dcd982a4c 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5998,7 +5998,7 @@ sub run_ctest() { # Special override: also ignore in Pushbuild, some platforms may not have it # Now, run ctest and collect output my $ctest_out= `ctest $ctest_vs 2>&1`; - if ($? == $no_ctest && $opt_ctest == -1 && ! defined $ENV{PB2WORKDIR}) { + if ($? == $no_ctest && ($opt_ctest == -1 || defined $ENV{PB2WORKDIR})) { chdir($olddir); return; } From aff9f26290277baa97ce3ce74829d8c1cf870e45 Mon Sep 17 00:00:00 2001 From: Libing Song Date: Tue, 10 Sep 2013 16:12:25 +0800 Subject: [PATCH 022/163] Bug#17402313 DUMP THREAD SENDS SOME EVENTS MORE THAN ONCE Postfix, suppress the new warning generated by the bug's fix. --- mysql-test/suite/rpl/r/rpl_log_pos.result | 1 + mysql-test/suite/rpl/t/rpl_log_pos.test | 1 + 2 files changed, 2 insertions(+) diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result index b2224dcd725..b3f68157211 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -1,6 +1,7 @@ include/master-slave.inc [connection master] call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); +CALL mtr.add_suppression("Failed to read an event from active binlog.*"); show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test index 484ffa52a44..87be576c285 100644 --- a/mysql-test/suite/rpl/t/rpl_log_pos.test +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -12,6 +12,7 @@ source include/master-slave.inc; call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); +CALL mtr.add_suppression("Failed to read an event from active binlog.*"); source include/show_master_status.inc; sync_slave_with_master; source include/stop_slave.inc; From b9ec18374165acc1081c810104d0371c444fe49d Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Tue, 10 Sep 2013 11:20:29 +0200 Subject: [PATCH 023/163] Bug#16482467 ORDER BY IGNORED IN SOME SITUATIONS FOR UPDATE QUERY For queries like update t1 set ... where order by ... limit ... we need to handle the fact that unique keys allow NULL values, and hence can return more than one row. sql/opt_range.cc: When the unique key has multiple key parts, check each key_part for nullability, rather than the first key part. (s/key->part ==/key_tree->part ==/) Also: revert the if() test, for better readability. --- sql/opt_range.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 386faed3aa2..c7a7d2531af 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -8071,15 +8071,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->key_parts-1) + if ((table_key->flags & HA_NOSAME) && + key_tree->part == table_key->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; } } } @@ -8109,7 +8110,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() From 42501173084f8a085a5cab38cb7d19ada8a96739 Mon Sep 17 00:00:00 2001 From: mithun Date: Tue, 10 Sep 2013 15:32:27 +0530 Subject: [PATCH 024/163] Bug #16978278 : BUFFER OVERFLOW WHEN PRINTING A LARGE 64-BIT INTEGER WITH MY_B_VPRINTF() Issue : In LP 64 machine max long value can be 20 digit decimal value. But in my_b_vprintf() the intermediate buffer storage used is 17 bytes length. This will lead to buffer overflow. Solution : Increased the buffer storage from 17 to 32 bytes. code is backported from 5.6 mysys/mf_iocache2.c: In function my_b_vprintf increased the size of local buff from 17 to 32 bytes. --- mysys/mf_iocache2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index eaa70782f16..f65ca97bd16 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -415,7 +415,7 @@ process_flags: { register int iarg; size_t length2; - char buff[17]; + char buff[32]; iarg = va_arg(args, int); if (*fmt == 'd') @@ -450,7 +450,7 @@ process_flags: { register long iarg; size_t length2; - char buff[17]; + char buff[32]; iarg = va_arg(args, long); if (*++fmt == 'd') From 59402fe0a76bae115c622cc241995180c4bdf4c9 Mon Sep 17 00:00:00 2001 From: Satya Bodapati Date: Wed, 11 Sep 2013 16:57:02 +0530 Subject: [PATCH 025/163] Bug#16752251 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE OPERATION IF IT IS DONE IN-PLACE With change buffer enabled, InnoDB doesn't write a transaction log record when it merges a record from the insert buffer to an secondary index page if the insertion is performed as an update-in-place. Fixed by logging the 'update-in-place' operation on secondary index pages. Approved by Marko. rb#2429 --- .../include/have_innodb_change_buffering.inc | 6 ++ mysql-test/include/search_pattern_in_file.inc | 66 +++++++++++++++++++ storage/innobase/btr/btr0cur.c | 30 ++++++--- storage/innobase/ibuf/ibuf0ibuf.c | 18 +++++ storage/innobase/include/btr0cur.h | 13 ++++ storage/innodb_plugin/btr/btr0cur.c | 30 ++++++--- storage/innodb_plugin/ibuf/ibuf0ibuf.c | 18 +++++ storage/innodb_plugin/include/btr0cur.h | 17 ++++- 8 files changed, 181 insertions(+), 17 deletions(-) create mode 100644 mysql-test/include/have_innodb_change_buffering.inc create mode 100644 mysql-test/include/search_pattern_in_file.inc diff --git a/mysql-test/include/have_innodb_change_buffering.inc b/mysql-test/include/have_innodb_change_buffering.inc new file mode 100644 index 00000000000..aadad84c6a1 --- /dev/null +++ b/mysql-test/include/have_innodb_change_buffering.inc @@ -0,0 +1,6 @@ +if (!`SHOW VARIABLES LIKE 'innodb_change_buffering_debug'`) +{ + # innodb_change_buffering_debug is enabled by UNIV_DEBUG or + # UNIV_IBUF_DEBUG + --skip Test requires binary with UNIV_DEBUG enabled +} 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 '' does not contain the expected 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 '' to '' +# 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 > $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/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index 8dc0a92408b..4ad4bacdc0f 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -31,6 +31,7 @@ Created 10/16/1994 Heikki Tuuri #include "btr0sea.h" #include "row0upd.h" #include "trx0rec.h" +#include "trx0undo.h" #include "trx0roll.h" /* trx_roll_crash_recv_trx */ #include "que0que.h" #include "row0row.h" @@ -1363,18 +1364,31 @@ 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, roll_ptr, log_ptr, - mtr); + if (index->type & DICT_CLUSTERED) { + log_ptr = row_upd_write_sys_vals_to_log( + index, trx, 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, ut_dulint_zero); + log_ptr += DATA_ROLL_PTR_LEN; + /* TRX_ID */ + log_ptr += mach_dulint_write_compressed(log_ptr, + ut_dulint_zero); + } + mach_write_to_2(log_ptr, page_offset(rec)); log_ptr += 2; diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c index 2ba3d785194..ae6c5f6636f 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.c +++ b/storage/innobase/ibuf/ibuf0ibuf.c @@ -3024,6 +3024,24 @@ updated_in_place: /* This is the easy case. Do something similar to btr_cur_update_in_place(). */ row_upd_rec_in_place(rec, offsets, update); + + /* 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, + NULL, + ut_dulint_zero, mtr); + DBUG_EXECUTE_IF( + "crash_after_log_ibuf_upd_inplace", + log_buffer_flush_to_disk(); + fprintf(stderr, + "InnoDB: Wrote log record for ibuf " + "update in place operation\n"); + DBUG_SUICIDE(); + ); + goto updated_in_place; } diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index c2b81d0ae91..bab405fa91e 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -558,6 +558,19 @@ btr_push_update_extern_fields( const ulint* offsets,/* in: array returned by rec_get_offsets() */ upd_t* update);/* in: update vector or NULL */ +/*************************************************************** +Writes a redo log record of updating a record in-place. */ +UNIV_INLINE +void +btr_cur_update_in_place_log( +/*========================*/ + ulint flags, /* in: flags */ + rec_t* rec, /* in: record */ + dict_index_t* index, /* in: index where cursor positioned */ + upd_t* update, /* in: update vector */ + trx_t* trx, /* in: transaction */ + dulint roll_ptr, /* in: roll ptr */ + mtr_t* mtr); /* in: mtr */ /*######################################################################*/ diff --git a/storage/innodb_plugin/btr/btr0cur.c b/storage/innodb_plugin/btr/btr0cur.c index 2b98b416793..f653929193a 100644 --- a/storage/innodb_plugin/btr/btr0cur.c +++ b/storage/innodb_plugin/btr/btr0cur.c @@ -58,6 +58,7 @@ Created 10/16/1994 Heikki Tuuri #include "btr0btr.h" #include "btr0sea.h" #include "trx0rec.h" +#include "trx0undo.h" #include "trx0roll.h" /* trx_is_recv() */ #include "que0que.h" #include "row0row.h" @@ -1557,18 +1558,31 @@ 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, roll_ptr, log_ptr, - mtr); + if (index->type & DICT_CLUSTERED) { + log_ptr = row_upd_write_sys_vals_to_log( + index, trx, 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, ut_dulint_zero); + log_ptr += DATA_ROLL_PTR_LEN; + /* TRX_ID */ + log_ptr += mach_dulint_write_compressed(log_ptr, + ut_dulint_zero); + } + mach_write_to_2(log_ptr, page_offset(rec)); log_ptr += 2; diff --git a/storage/innodb_plugin/ibuf/ibuf0ibuf.c b/storage/innodb_plugin/ibuf/ibuf0ibuf.c index e084a61d5d3..5d018bcdbc9 100644 --- a/storage/innodb_plugin/ibuf/ibuf0ibuf.c +++ b/storage/innodb_plugin/ibuf/ibuf0ibuf.c @@ -3072,6 +3072,24 @@ updated_in_place: to btr_cur_update_in_place(). */ 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, + NULL, + ut_dulint_zero, mtr); + DBUG_EXECUTE_IF( + "crash_after_log_ibuf_upd_inplace", + log_buffer_flush_to_disk(); + fprintf(stderr, + "InnoDB: Wrote log record for ibuf " + "update in place operation\n"); + DBUG_SUICIDE(); + ); + goto updated_in_place; } diff --git a/storage/innodb_plugin/include/btr0cur.h b/storage/innodb_plugin/include/btr0cur.h index 7744d2d1ee2..2321d718f03 100644 --- a/storage/innodb_plugin/include/btr0cur.h +++ b/storage/innodb_plugin/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 @@ -636,6 +636,21 @@ btr_push_update_extern_fields( mem_heap_t* heap) /*!< in: memory heap */ __attribute__((nonnull)); +/***********************************************************//** +Writes a redo log record of updating a record in-place. */ +UNIV_INLINE +void +btr_cur_update_in_place_log( +/*========================*/ + ulint flags, /*!< in: flags */ + rec_t* rec, /*!< in: record */ + dict_index_t* index, /*!< in: index where cursor + positioned */ + const upd_t* update, /*!< in: update vector */ + trx_t* trx, /*!< in: transaction */ + roll_ptr_t roll_ptr, /*!< in: roll ptr */ + mtr_t* mtr); /*!< in: mtr */ + /*######################################################################*/ /** In the pessimistic delete, if the page data size drops below this From 64a845e0a6e0baa355042c693db833b03e9b6106 Mon Sep 17 00:00:00 2001 From: Satya Bodapati Date: Thu, 12 Sep 2013 12:28:16 +0530 Subject: [PATCH 026/163] Additional Fix to BUG#16755251 for 5.1 build failure and disable testcase due to BUG#17446090 --- storage/innobase/btr/btr0cur.c | 1 - storage/innobase/include/btr0cur.h | 2 +- storage/innodb_plugin/btr/btr0cur.c | 2 +- storage/innodb_plugin/include/btr0cur.h | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index 4ad4bacdc0f..8704e443099 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -1336,7 +1336,6 @@ btr_cur_upd_lock_and_undo( /*************************************************************** Writes a redo log record of updating a record in-place. */ -UNIV_INLINE void btr_cur_update_in_place_log( /*========================*/ diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index bab405fa91e..5095fd5e875 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -560,7 +560,7 @@ btr_push_update_extern_fields( /*************************************************************** Writes a redo log record of updating a record in-place. */ -UNIV_INLINE + void btr_cur_update_in_place_log( /*========================*/ diff --git a/storage/innodb_plugin/btr/btr0cur.c b/storage/innodb_plugin/btr/btr0cur.c index f653929193a..93b150341b0 100644 --- a/storage/innodb_plugin/btr/btr0cur.c +++ b/storage/innodb_plugin/btr/btr0cur.c @@ -1530,7 +1530,7 @@ btr_cur_upd_lock_and_undo( /***********************************************************//** Writes a redo log record of updating a record in-place. */ -UNIV_INLINE +UNIV_INTERN void btr_cur_update_in_place_log( /*========================*/ diff --git a/storage/innodb_plugin/include/btr0cur.h b/storage/innodb_plugin/include/btr0cur.h index 2321d718f03..5d07fffbf8c 100644 --- a/storage/innodb_plugin/include/btr0cur.h +++ b/storage/innodb_plugin/include/btr0cur.h @@ -638,7 +638,7 @@ btr_push_update_extern_fields( /***********************************************************//** Writes a redo log record of updating a record in-place. */ -UNIV_INLINE +UNIV_INTERN void btr_cur_update_in_place_log( /*========================*/ From 87d5dc1388fd4819133d4cda5feeb87f99a1984d Mon Sep 17 00:00:00 2001 From: Satya Bodapati Date: Thu, 12 Sep 2013 17:59:14 +0530 Subject: [PATCH 027/163] Fix FreeBSD build failure due to BUG#16752251 (only in 5.5) --- storage/innobase/btr/btr0cur.c | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index 16d5016a9b5..7762907b6aa 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -61,6 +61,7 @@ Created 10/16/1994 Heikki Tuuri #include "row0upd.h" #include "trx0rec.h" #include "trx0roll.h" /* trx_is_recv() */ +#include "trx0undo.h" #include "que0que.h" #include "row0row.h" #include "srv0srv.h" From b7232337e9c2a4b449b8028415f027e82a65084d Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Thu, 12 Sep 2013 21:26:15 +0200 Subject: [PATCH 028/163] post-push fix for bug#53947 test change only. Removed --source include/not_windows_embedded.inc which was added due to that bug. --- mysql-test/suite/innodb/t/innodb.test | 6 ------ mysql-test/suite/sys_vars/t/identity_func.test | 6 ------ .../suite/sys_vars/t/innodb_autoinc_lock_mode_func.test | 6 ------ mysql-test/suite/sys_vars/t/last_insert_id_func.test | 6 ------ mysql-test/suite/sys_vars/t/storage_engine_basic.test | 6 ------ mysql-test/suite/sys_vars/t/tx_isolation_func.test | 6 ------ 6 files changed, 36 deletions(-) diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index 3038bb0331e..9c407759fd8 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. # 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_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/storage_engine_basic.test b/mysql-test/suite/sys_vars/t/storage_engine_basic.test index 49e8a52efea..6c8c777be98 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 # From d4ccf905bef7eca6329e2f439ac9fa0610b3aa92 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Tue, 17 Sep 2013 12:43:34 +0200 Subject: [PATCH 029/163] Bug#16765410 FTS: STACK AROUND THE VARIABLE 'MYSTR' WAS CORRUPTED IN INNOBASE_STRNXFRM my_strnxfrm_win1250ch could write into dest[destlen] i.e. write a byte to the past-the-end of dest. --- strings/ctype-win1250ch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index cbb1ad5e685..a8181afa776 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -500,7 +500,7 @@ static size_t my_strnxfrm_win1250ch(CHARSET_INFO * cs __attribute__((unused)), do { NEXT_CMP_VALUE(src, p, pass, value, (int)srclen); - if (totlen <= len) + if (totlen < len) dest[totlen] = value; totlen++; } while (value) ; From 1d40f2ad64ee87c1460a3578179dfbdc6896e2dd Mon Sep 17 00:00:00 2001 From: Vinay Fisrekar Date: Thu, 19 Sep 2013 13:52:01 +0530 Subject: [PATCH 030/163] Making rpl.rpl_spec_variables experimental for solaris till bug#17337114 is fixed. --- mysql-test/collections/default.experimental | 1 + 1 file changed, 1 insertion(+) 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 From 5897b81a5b4d2c3190ad343655327a394efe8495 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Fri, 20 Sep 2013 16:10:31 +0200 Subject: [PATCH 031/163] Bug#17435338 ADD A -DWITH_ASAN SWITCH/OPTION TO OUR CMAKE SCRIPTS Tested with: gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) clang version 3.1 (tags/RELEASE_31/final) Target: x86_64-apple-darwin10.8.0 --- CMakeLists.txt | 78 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aee0fb650e8..369a6b5c8f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,7 +177,83 @@ ENDIF() OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON) MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED) - + + +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") From cc4043f013ba796050ba1a971e5806d3bc0ca572 Mon Sep 17 00:00:00 2001 From: Sujatha Sivakumar Date: Mon, 23 Sep 2013 12:13:37 +0530 Subject: [PATCH 032/163] Bug#17327454:SEMI-SYNC REPLICATION MASTER CRASH WHEN SET RPL_SEMI_SYNC_MASTER_ENABLED OFF. Problem: ======= If master is waiting for a reply from slave, at this time set global rpl_semi_sync_master_enabled=OFF, the master server will crash. Analysis: ======== When master is waiting for a reply from slave, at this time if semi sync is switched off on master, during switch off if active transactions are present the transactions will be cleared and "active_tranxs_" variable will be set to NULL. When the waiting master connection finds that semi sync is switched of it tries to access "active_tranxs_" without checking if the transaction list exists or not. Accessing NULL transaction list causes the crash. Fix: === A check has been added to see a valid list exists before accessing the "active_tranxs_". plugin/semisync/semisync_master.cc: Added check for the existence of valid 'active_transx_'. --- plugin/semisync/semisync_master.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index 1be876d0f1b..87adbdcae79 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -752,7 +752,8 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name, At this point, the binlog file and position of this transaction must have been removed from ActiveTranx. */ - assert(!active_tranxs_->is_tranx_end_pos(trx_wait_binlog_name, + assert(!getMasterEnabled() || + !active_tranxs_->is_tranx_end_pos(trx_wait_binlog_name, trx_wait_binlog_pos)); /* Update the status counter. */ From d4011a614411e67633cc75a6233c74a22dd32ff5 Mon Sep 17 00:00:00 2001 From: Shivji Kumar Jha Date: Fri, 27 Sep 2013 01:24:16 +0530 Subject: [PATCH 033/163] BUG#16580366- MTR TESTS FAILING SPORADICALLY ON PB2 (5.5, 5.6 AND 5.7) DURING INNODB RECOVERY Problem: ======= The connection 'master' is dropped by mysqltest after rpl_end.inc. At this point, dropping temporary tables at the connection 'master' are not synced at slave. So, the temporary tables replicated from master remain on slave leading to an inconsistent close of the test. The following test thus complains about the presence of temporary table(s) left over from the previous test. Fix: === - Put explicit drop commands in replication tests so that the temporary tables are dropped at slave as well. - Added the check for Slave_open_temp_tables in mtr_check.sql to warn about the remaining temporary table, if any, at the close of a test. --- .../extra/rpl_tests/rpl_drop_create_temp_table.inc | 10 +++++++--- mysql-test/extra/rpl_tests/rpl_innodb.test | 2 +- mysql-test/extra/rpl_tests/rpl_reset_slave.test | 3 +++ mysql-test/include/mtr_check.sql | 2 ++ .../rpl/r/rpl_create_tmp_table_if_not_exists.result | 3 +++ mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result | 1 + .../rpl/r/rpl_mixed_drop_create_temp_table.result | 6 ++++++ mysql-test/suite/rpl/r/rpl_rotate_logs.result | 1 + .../suite/rpl/r/rpl_row_drop_create_temp_table.result | 6 ++++++ mysql-test/suite/rpl/r/rpl_row_reset_slave.result | 1 + mysql-test/suite/rpl/r/rpl_stm_000001.result | 1 + .../suite/rpl/r/rpl_stm_drop_create_temp_table.result | 6 ++++++ mysql-test/suite/rpl/r/rpl_stm_innodb.result | 1 + mysql-test/suite/rpl/r/rpl_stm_reset_slave.result | 1 + .../rpl/t/rpl_create_tmp_table_if_not_exists.test | 4 ++++ mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test | 1 + mysql-test/suite/rpl/t/rpl_rotate_logs.test | 1 + mysql-test/suite/rpl/t/rpl_stm_000001.test | 2 +- 18 files changed, 47 insertions(+), 5 deletions(-) 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 094e84537db..983851adfcd 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 @@ -150,10 +150,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; @@ -162,10 +161,15 @@ if (`SELECT HEX(@commands) = HEX('clean')`) DROP TABLE IF EXISTS nt_xx_1; + 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 e590bd70c88..11aa58f730f 100644 --- a/mysql-test/extra/rpl_tests/rpl_innodb.test +++ b/mysql-test/extra/rpl_tests/rpl_innodb.test @@ -112,7 +112,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_reset_slave.test b/mysql-test/extra/rpl_tests/rpl_reset_slave.test index 0d94f04ca44..44bd650682d 100644 --- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test @@ -38,6 +38,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/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index fbe5df632c6..9c51b333ec6 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -72,6 +72,8 @@ BEGIN mysql.time_zone_transition_type, mysql.user; + show status like 'slave_open_temp_tables'; + END|| -- 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 6bafbb32897..40a38ee8592 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 @@ -15,4 +15,7 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS t master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp 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_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result index 99c5846cea0..55c74b0b533 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result @@ -42,4 +42,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 761ff2f8e98..57c947c9333 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 @@ -1554,8 +1554,14 @@ master-bin.000001 # Query # # COMMIT SET @commands= 'clean'; DROP TABLE IF EXISTS tt_xx_1; DROP TABLE IF EXISTS nt_xx_1; +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_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result index 256ed4eaad2..9459361cb30 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -85,6 +85,7 @@ lock tables t3 read; include/assert.inc [Table t3 should contain 100 lines on the slave] 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_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result index 88754e2cf8c..a55c8e2a2bc 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 @@ -1619,8 +1619,14 @@ master-bin.000001 # Query # # COMMIT SET @commands= 'clean'; DROP TABLE IF EXISTS tt_xx_1; DROP TABLE IF EXISTS nt_xx_1; +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_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_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index 9493013a283..7aeff0d3d46 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=1053] 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 42f16a4c175..08b318fbb43 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 @@ -1604,8 +1604,14 @@ master-bin.000001 # Query # # ROLLBACK SET @commands= 'clean'; DROP TABLE IF EXISTS tt_xx_1; DROP TABLE IF EXISTS nt_xx_1; +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_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/t/rpl_create_tmp_table_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test index daf6b7e9ad8..bf2c5442d40 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_mixed_ddl_dml.test b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test index cbd7e9c2558..4309dc3f9b1 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test @@ -43,6 +43,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_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test index dc158d7ef92..4d0c93f46bd 100644 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test @@ -218,6 +218,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_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index 268a10ad1fa..e7237af57c3 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -91,8 +91,8 @@ connection master1; sleep 3; 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 From 797a49f848f4c456a95be07781c493c710254b3a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Sep 2013 18:30:46 +0530 Subject: [PATCH 034/163] From e64b9e12509f7fc800a55864c83ea26e0f51d515 Mon Sep 17 00:00:00 2001 From: Yasufumi Kinoshita Date: Mon, 30 Sep 2013 13:41:48 +0900 Subject: [PATCH 035/163] Bug#11758196 : INNODB ASSERTION FAILURE WHEN CONVERTING FROM MYISAM TO INNODB Changed to try to extend log buffer instead of crash, when log size is too large for the size. Approved by Marko in rb#3229 --- storage/innobase/include/log0log.h | 2 + storage/innobase/log/log0log.c | 109 ++++++++++++++++++++++++++++- 2 files changed, 110 insertions(+), 1 deletion(-) diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index 5524272d811..b0e5e9bda3b 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -809,6 +809,8 @@ struct log_struct{ later; this is advanced when a flush operation is completed to all the log groups */ + volatile ibool is_extending; /*!< this is set to true during extend + the log buffer size */ ib_uint64_t written_to_some_lsn; /*!< first log sequence number not yet written to any log group; for this to diff --git a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c index 8bae95f0a5d..046c494c99d 100644 --- a/storage/innobase/log/log0log.c +++ b/storage/innobase/log/log0log.c @@ -213,6 +213,84 @@ 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 = mem_alloc(LOG_BUFFER_SIZE + OS_FILE_LOG_BLOCK_SIZE); + log_sys->buf = 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)); + + fprintf(stderr, + "InnoDB: innodb_log_buffer_size was extended to %lu.\n", + LOG_BUFFER_SIZE); +} + /************************************************************//** Opens the log for log_write_low. The log must be closed with log_close and released with log_release. @@ -233,11 +311,39 @@ 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. */ + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Warning: " + "The transaction log size is too large" + " for innodb_log_buffer_size (%lu >= %lu / 2). " + "Trying to extend it.\n", + 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 */ @@ -788,6 +894,7 @@ log_init(void) log_sys->buf = ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE); log_sys->buf_size = LOG_BUFFER_SIZE; + log_sys->is_extending = FALSE; memset(log_sys->buf, '\0', LOG_BUFFER_SIZE); From d4800a57badc79d380492810b648db6e52511e14 Mon Sep 17 00:00:00 2001 From: Yasufumi Kinoshita Date: Mon, 30 Sep 2013 15:02:54 +0900 Subject: [PATCH 036/163] Adjustment for fix for Bug#11758196 log_buffer_extend() should fill the new buffer with 0. --- storage/innobase/log/log0log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c index 046c494c99d..eacee12a2d4 100644 --- a/storage/innobase/log/log0log.c +++ b/storage/innobase/log/log0log.c @@ -275,6 +275,7 @@ log_buffer_extend( log_sys->buf_ptr = mem_alloc(LOG_BUFFER_SIZE + OS_FILE_LOG_BLOCK_SIZE); log_sys->buf = ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE); log_sys->buf_size = LOG_BUFFER_SIZE; + memset(log_sys->buf, '\0', LOG_BUFFER_SIZE); log_sys->max_buf_free = log_sys->buf_size / LOG_BUF_FLUSH_RATIO - LOG_BUF_FLUSH_MARGIN; From 2ea00f9f6e3531336af254489c5061b01ff8dd44 Mon Sep 17 00:00:00 2001 From: "Sreedhar.S" Date: Mon, 30 Sep 2013 12:29:10 +0530 Subject: [PATCH 037/163] Fix to copy missing pdb files BUG 13878021 --- CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 369a6b5c8f9..0de56225155 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,6 +464,27 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") ) INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) INSTALL(FILES ${CMAKE_BINARY_DIR}/Docs/INFO_SRC ${CMAKE_BINARY_DIR}/Docs/INFO_BIN DESTINATION ${INSTALL_DOCDIR}) + + IF(WIN32) + SET(EXTRA_PDB_FILES + ${CMAKE_BINARY_DIR}/libmysql/authentication_win/${CMAKE_BUILD_TYPE}/auth_win_client.pdb + ${CMAKE_BINARY_DIR}/libmysql/${CMAKE_BUILD_TYPE}/clientlib.pdb + ${CMAKE_BINARY_DIR}/strings/${CMAKE_BUILD_TYPE}/strings.pdb + ${CMAKE_BINARY_DIR}/mysys/${CMAKE_BUILD_TYPE}/mysys.pdb + ${CMAKE_BINARY_DIR}/vio/${CMAKE_BUILD_TYPE}/vio.pdb + ${CMAKE_BINARY_DIR}/zlib/${CMAKE_BUILD_TYPE}/zlib.pdb + ${CMAKE_BINARY_DIR}/extra/yassl/${CMAKE_BUILD_TYPE}/yassl.pdb + ${CMAKE_BINARY_DIR}/extra/yassl/taocrypt/${CMAKE_BUILD_TYPE}/taocrypt.pdb + ) + INSTALL(FILES ${EXTRA_PDB_FILES} DESTINATION ${INSTALL_LIBDIR} COMPONENT DebugBinaries) + FOREACH(f ${EXTRA_PDB_FILES}) + STRING(REPLACE "RelWithDebInfo" "Debug" df ${f}) + IF(EXISTS ${df}) + INSTALL(FILES ${df} DESTINATION ${INSTALL_LIBDIR}/debug COMPONENT DebugBinaries) + ENDIF() + ENDFOREACH() + ENDIF() + IF(UNIX) INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) ENDIF() From bac7961358507bd617c18f3eb5ff6963dd9fac25 Mon Sep 17 00:00:00 2001 From: "Sreedhar.S" Date: Mon, 30 Sep 2013 12:41:22 +0530 Subject: [PATCH 038/163] Fix for Bug:16053094 Registry redirection was improper and hence not able to pick the value for the OLDERVERSION property. as a result in the install upgrade dialog null value wa being passed. --- packaging/WiX/mysql_server.wxs.in | 42 ++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/packaging/WiX/mysql_server.wxs.in b/packaging/WiX/mysql_server.wxs.in index 752dc15304e..65688838316 100644 --- a/packaging/WiX/mysql_server.wxs.in +++ b/packaging/WiX/mysql_server.wxs.in @@ -70,10 +70,10 @@ Installed - + - + @@ -83,31 +83,43 @@ Name="InstallLocation" Type="raw" /> - - - - + + + + + + + + + + - + - - - INSTALLDIR2 - + + + INSTALLDIR2 + From 99146a50560a282973615addf47c4287fc226e7f Mon Sep 17 00:00:00 2001 From: "Sreedhar.S" Date: Mon, 30 Sep 2013 13:01:17 +0530 Subject: [PATCH 039/163] Bug #16619754 - MYSQL_INSTALL_DB.PL FAILS TO CREATE DATABASE ON WINDOWS. As this mysql_install_db.pl file has always generated lots of confusion on Windows. This fix will make sure to get it removed only from Windows --- scripts/CMakeLists.txt | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 424d92e31e1..d5a3311d942 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -198,24 +198,17 @@ ELSE() SET(localstatedir ${MYSQL_DATADIR}) ENDIF() -IF(UNIX) -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh - ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY) +IF(NOT WIN32) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.pl.in + ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY) SET(DEST ${INSTALL_SCRIPTDIR}) - SET(EXT) -ELSE() - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.pl.in - ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db.pl ESCAPE_QUOTES @ONLY) - SET(DEST ${INSTALL_SCRIPTDIR}) - SET(EXT ".pl") -ENDIF() -INSTALL_SCRIPT( - "${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db${EXT}" - DESTINATION ${DEST} - COMPONENT Server + INSTALL_SCRIPT( + "${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db" + DESTINATION ${DEST} + COMPONENT Server ) - +ENDIF() SET(prefix "${CMAKE_INSTALL_PREFIX}") SET(sysconfdir ${prefix}) From 6ca4be9c03cd8d51b326389eeac6e767a36ec188 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Tue, 1 Oct 2013 10:05:45 +0200 Subject: [PATCH 040/163] Bug#14621190: HA_INNOBASE::INDEX_NEXT SKIPS A RECORD IF PREVIOUS INDEX_READ_MAP HAD NO MATCH If index_read_map is called for exact search and no matching records exists it will position the cursor on the next record, but still having the relative position to BTR_PCUR_ON. This will make a call for index_next to read yet another next record, instead of returning the record the cursor points to. Fixed by setting pcur->rel_pos = BTR_PCUR_BEFORE if an exact [prefix] search is done, but failed. Also avoids optimistic restoration if rel_pos != BTR_PCUR_ON, since btr_cur may be different than old_rec. rb#3324, approved by Marko and Jimmy --- .../suite/innodb/r/innodb_bug13510739.result | 2 +- storage/innobase/btr/btr0pcur.c | 12 +++++----- storage/innobase/row/row0sel.c | 24 +++++++++++++++++++ 3 files changed, 31 insertions(+), 7 deletions(-) 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/storage/innobase/btr/btr0pcur.c b/storage/innobase/btr/btr0pcur.c index 0cfdf138bad..fbedc1e7d04 100644 --- a/storage/innobase/btr/btr0pcur.c +++ b/storage/innobase/btr/btr0pcur.c @@ -273,13 +273,15 @@ 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 cursor is expected to be + positioned on the same btr record as before (BTR_PCUR_ON). */ - if (UNIV_LIKELY(buf_page_optimistic_get( + if (cursor->rel_pos == BTR_PCUR_ON + && buf_page_optimistic_get( latch_mode, cursor->block_when_stored, cursor->modify_clock, - file, line, mtr))) { + file, line, mtr)) { cursor->pos_state = BTR_PCUR_IS_POSITIONED; buf_block_dbg_add_level( @@ -287,7 +289,7 @@ btr_pcur_restore_position_func( dict_index_is_ibuf(index) ? SYNC_IBUF_TREE_NODE : SYNC_TREE_NODE); - if (cursor->rel_pos == BTR_PCUR_ON) { + { #ifdef UNIV_DEBUG const rec_t* rec; const ulint* offsets1; @@ -312,8 +314,6 @@ btr_pcur_restore_position_func( #endif /* UNIV_DEBUG */ return(TRUE); } - - return(FALSE); } } diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index 518eba975ab..28da1f69e8a 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -3116,6 +3116,13 @@ sel_restore_position_for_mysql( return(TRUE); } + /* success can only be TRUE for BTR_PCUR_ON! */ + ut_ad(!success); + + /* BTR_PCUR_BEFORE -> the position is now set to the record before + pcur->old_rec. + BTR_PCUR_AFTER-> positioned to record after pcur->old_rec. */ + if (relative_position == BTR_PCUR_AFTER || relative_position == BTR_PCUR_AFTER_LAST_IN_TREE) { @@ -4120,6 +4127,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; /* ut_print_name(stderr, index->name); fputs(" record not found 3\n", stderr); */ @@ -4159,6 +4174,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; /* ut_print_name(stderr, index->name); fputs(" record not found 4\n", stderr); */ @@ -4736,6 +4759,7 @@ normal_return: if (prebuilt->n_fetch_cached > 0) { row_sel_pop_cached_row_for_mysql(buf, prebuilt); + DEBUG_SYNC_C("row_search_cached_row"); err = DB_SUCCESS; } From 19689875f8b0a69d4f25a53c941b7880aa597988 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Oct 2013 14:17:35 +0300 Subject: [PATCH 041/163] From 2f02f6cce1af08973183b39d4b1bca29f224692a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Oct 2013 13:51:13 +0200 Subject: [PATCH 042/163] From c904103b3fd115897b2b079db6829a11565936af Mon Sep 17 00:00:00 2001 From: Praveenkumar Hulakund Date: Sat, 5 Oct 2013 15:29:02 +0530 Subject: [PATCH 043/163] Bug#11745656 - KILL THREAD -> ERROR: "SERVER SHUTDOWN IN PROGRESS" Description: ------------ There are 2 issues reported in the bug report, 1. One session running a "long" select, then, from the other session, you kill that first one, while select is running, and it receives that message "Server shutdown in progress". Reported Date: 02-Apr-2006 => Looks like this isuse is already fixed in 2009 by the patch pushed for bug28141. 2. Killing query which goes to filesort, logs error entries like: 120416 9:17:28 [ERROR] mysqld: Sort aborted: Server shutdown in progress 120416 9:18:48 [ERROR] mysqld: Sort aborted: Server shutdown in progress 120416 9:19:39 [ERROR] mysqld: Sort aborted: Server shutdown in progress Reported Date: 16-Apr-2012 => This issue is introduced in 5.5+ versions. Fixing this issue in this patch. Analysis: --------- In function "filesort()", on error we are logging error message. To the error message, the message related THD::killed_errno is also appeneded, if it is set.(THD::kill_errno value is obtained by calling member function THD::killed_errno) In the scenario mentioned in this bug report, when we kill the connection, THD::kill_errno is set to the THD::KILL_CONNECTION. Enum type THD::KILL_CONNECTION corressponds to value ER_SERVER_SHUTDOWN. Because of this, "Server shutdown in ...." is appended to the message logged. Fix: ---- Modified code of "filesort()" function to append "KILL_QUERY" status to error message when thread is killed and server shutdown is not in progress. --- sql/filesort.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/filesort.cc b/sql/filesort.cc index e829721a29b..d877ff4a8a4 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -339,7 +339,10 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, "%s: %s", MYF(ME_ERROR + ME_WAITTANG), ER_THD(thd, ER_FILSORT_ABORT), - kill_errno ? ER(kill_errno) : thd->stmt_da->message()); + kill_errno ? ((kill_errno == THD::KILL_CONNECTION && + !shutdown_in_progress) ? ER(THD::KILL_QUERY) : + ER(kill_errno)) : + thd->stmt_da->message()); if (global_system_variables.log_warnings > 1) { From d8761fd62f1ff5e36136caa0ecf6c89f503c0543 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Oct 2013 09:49:32 +0530 Subject: [PATCH 044/163] From 4db0c831a5a3b850fa554f77024feef092a4a45c Mon Sep 17 00:00:00 2001 From: Yasufumi Kinoshita Date: Mon, 7 Oct 2013 15:16:31 +0900 Subject: [PATCH 045/163] Bug#17431533 : FAILING ASSERTION: INDEX->PAGE != 0XFFFFFFFF AFTER DISCARDING TABLESPACE ha_innobase::records_in_range() should return HA_POS_ERROR for the table during discarded without requesting pages. The later other handler method should treat the error correctly. Approved by Sunny in rb#3433 --- storage/innobase/handler/ha_innodb.cc | 7 +++++++ storage/innodb_plugin/handler/ha_innodb.cc | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 9f5ba543a47..8c9fc33fa35 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -6454,6 +6454,11 @@ ha_innobase::records_in_range( index = dict_table_get_index_noninline(prebuilt->table, key->name); + if (prebuilt->table->ibd_file_missing) { + n_rows = HA_POS_ERROR; + goto func_exit; + } + range_start = dtuple_create_for_mysql(&heap1, key->key_parts); dict_index_copy_types(range_start, index, key->key_parts); @@ -6503,6 +6508,8 @@ ha_innobase::records_in_range( my_free(key_val_buff2, MYF(0)); +func_exit: + prebuilt->trx->op_info = (char*)""; /* The MySQL optimizer seems to believe an estimate of 0 rows is diff --git a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc index 971c55a623c..cde3c679766 100644 --- a/storage/innodb_plugin/handler/ha_innodb.cc +++ b/storage/innodb_plugin/handler/ha_innodb.cc @@ -7523,6 +7523,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 (prebuilt->table->ibd_file_missing) { + n_rows = HA_POS_ERROR; + goto func_exit; + } if (UNIV_UNLIKELY(!index)) { n_rows = HA_POS_ERROR; goto func_exit; From 350d6e625e9680bc9217f8760aba3d4abd6e7c5b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Oct 2013 14:03:57 +0530 Subject: [PATCH 046/163] From af1082f44d7feafd5e9d1769655db5b45de43201 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Oct 2013 18:17:26 +0530 Subject: [PATCH 047/163] From d97df1e8ff85b66640ed5ee90d4f08d249d73fce Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 8 Oct 2013 18:37:43 +0100 Subject: [PATCH 048/163] BUG#17508351: REDUNDANT CODE IN REPLSEMISYNCMASTER::UPDATESYNCHEADER ReplSemiSyncMaster::updateSyncHeader contains redundant assignments to the local variable sync. This patch removes them. --- plugin/semisync/semisync_master.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index 87adbdcae79..6b8bb915445 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -894,10 +894,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); @@ -905,15 +902,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_) { From c8c948ffa6985e29752ffa7d851ede05037e148f Mon Sep 17 00:00:00 2001 From: "Sreedhar.S" Date: Wed, 9 Oct 2013 11:10:46 +0530 Subject: [PATCH 049/163] Bug 13878021 - WINDOWS PACKAGE THAT INCLUDES .PDB FILES FOR INTERMEDIATE LIBRARIES USED --- CMakeLists.txt | 20 -------------------- extra/yassl/CMakeLists.txt | 5 +++++ extra/yassl/taocrypt/CMakeLists.txt | 5 +++++ libmysql/CMakeLists.txt | 2 ++ libmysql/authentication_win/CMakeLists.txt | 5 +++++ mysys/CMakeLists.txt | 5 +++++ strings/CMakeLists.txt | 5 +++++ vio/CMakeLists.txt | 5 +++++ zlib/CMakeLists.txt | 5 +++++ 9 files changed, 37 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0de56225155..7f46c671f3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -465,26 +465,6 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) INSTALL(FILES ${CMAKE_BINARY_DIR}/Docs/INFO_SRC ${CMAKE_BINARY_DIR}/Docs/INFO_BIN DESTINATION ${INSTALL_DOCDIR}) - IF(WIN32) - SET(EXTRA_PDB_FILES - ${CMAKE_BINARY_DIR}/libmysql/authentication_win/${CMAKE_BUILD_TYPE}/auth_win_client.pdb - ${CMAKE_BINARY_DIR}/libmysql/${CMAKE_BUILD_TYPE}/clientlib.pdb - ${CMAKE_BINARY_DIR}/strings/${CMAKE_BUILD_TYPE}/strings.pdb - ${CMAKE_BINARY_DIR}/mysys/${CMAKE_BUILD_TYPE}/mysys.pdb - ${CMAKE_BINARY_DIR}/vio/${CMAKE_BUILD_TYPE}/vio.pdb - ${CMAKE_BINARY_DIR}/zlib/${CMAKE_BUILD_TYPE}/zlib.pdb - ${CMAKE_BINARY_DIR}/extra/yassl/${CMAKE_BUILD_TYPE}/yassl.pdb - ${CMAKE_BINARY_DIR}/extra/yassl/taocrypt/${CMAKE_BUILD_TYPE}/taocrypt.pdb - ) - INSTALL(FILES ${EXTRA_PDB_FILES} DESTINATION ${INSTALL_LIBDIR} COMPONENT DebugBinaries) - FOREACH(f ${EXTRA_PDB_FILES}) - STRING(REPLACE "RelWithDebInfo" "Debug" df ${f}) - IF(EXISTS ${df}) - INSTALL(FILES ${df} DESTINATION ${INSTALL_LIBDIR}/debug COMPONENT DebugBinaries) - ENDIF() - ENDFOREACH() - ENDIF() - IF(UNIX) INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) ENDIF() diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt index b8432f06ac6..94a336c53dc 100644 --- a/extra/yassl/CMakeLists.txt +++ b/extra/yassl/CMakeLists.txt @@ -37,4 +37,9 @@ ENDIF() 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/taocrypt/CMakeLists.txt b/extra/yassl/taocrypt/CMakeLists.txt index 10ed614445e..9f1f2a102da 100644 --- a/extra/yassl/taocrypt/CMakeLists.txt +++ b/extra/yassl/taocrypt/CMakeLists.txt @@ -36,3 +36,8 @@ ENDIF() 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/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index 1d7a134aefa..83386d8073a 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -168,8 +168,10 @@ ENDIF() 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) diff --git a/libmysql/authentication_win/CMakeLists.txt b/libmysql/authentication_win/CMakeLists.txt index 80cd14780e6..cd790975b34 100644 --- a/libmysql/authentication_win/CMakeLists.txt +++ b/libmysql/authentication_win/CMakeLists.txt @@ -31,3 +31,8 @@ TARGET_LINK_LIBRARIES(auth_win_client Secur32) # In IDE, group headers in a separate folder. SOURCE_GROUP(Headers REGULAR_EXPRESSION ".*h$") + +INSTALL_DEBUG_SYMBOLS(auth_win_client) +IF(MSVC) + INSTALL_DEBUG_TARGET(auth_win_client DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 95d3e568be7..648a87d1e95 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -77,3 +77,8 @@ ENDIF() 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/strings/CMakeLists.txt b/strings/CMakeLists.txt index 552bf942700..77b093c4fb1 100644 --- a/strings/CMakeLists.txt +++ b/strings/CMakeLists.txt @@ -31,3 +31,8 @@ ENDIF() # Avoid dependencies on perschema data defined in mysys ADD_DEFINITIONS(-DDISABLE_MYSQL_THREAD_H) ADD_CONVENIENCE_LIBRARY(strings ${STRINGS_SOURCES}) + +INSTALL_DEBUG_SYMBOLS(strings) +IF(MSVC) + INSTALL_DEBUG_TARGET(strings DESTINATION ${INSTALL_LIBDIR}/debug) +ENDIF() diff --git a/vio/CMakeLists.txt b/vio/CMakeLists.txt index e61281a43d8..bf811a0de9b 100644 --- a/vio/CMakeLists.txt +++ b/vio/CMakeLists.txt @@ -20,3 +20,8 @@ ADD_DEFINITIONS(${SSL_DEFINES}) SET(VIO_SOURCES vio.c viosocket.c viossl.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/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index 68799947e44..bcfacea4b0b 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -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() + From c66a037dcaa757607acb7016be63d813a04d6d43 Mon Sep 17 00:00:00 2001 From: Praveenkumar Hulakund Date: Wed, 9 Oct 2013 13:32:31 +0530 Subject: [PATCH 050/163] Bug#17474166 - EXECUTING STATEMENT LIKE 'SHOW ENGINE INNODB' AND 'KILL SESSION' LEAD TO CRASH Analysis: -------- This situation occurs when the connection executes query "show engine innodb status" and this connection is killed by executing statement "kill " by another connection. In function "innodb_show_status", function "stat_print" is called to print the status but return value of function is not checked. After killing connection, if write to connection fails then error is returned and same is set in Diagnostic area. Since FALSE is returned from "innodb_show_status" now, assert to check no error is set in function "set_eof_status" (called from my_eof) is failing. Fix: ---- Changed code to check return value of function "stat_print" in "innodb_show_status". --- sql/handler.cc | 6 ++++++ sql/net_serv.cc | 8 +++++++- storage/innobase/handler/ha_innodb.cc | 8 +++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index c3ad1cade99..6307e95a194 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4921,8 +4921,14 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) "", 0, "DISABLED", 8) ? 1 : 0; } else + { + DBUG_EXECUTE_IF("simulate_show_status_failure", + DBUG_SET("+d,simulate_net_write_failure");); result= db_type->show_status && db_type->show_status(db_type, thd, stat_print, stat) ? 1 : 0; + DBUG_EXECUTE_IF("simulate_show_status_failure", + DBUG_SET("-d,simulate_net_write_failure");); + } } if (!result) diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 1a79679ed7c..8b44c7d443f 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -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 @@ -370,6 +370,12 @@ my_net_write(NET *net,const uchar *packet,size_t len) MYSQL_NET_WRITE_START(len); + DBUG_EXECUTE_IF("simulate_net_write_failure", { + my_error(ER_NET_ERROR_ON_WRITE, MYF(0)); + return 1; + }; + ); + /* Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH length. The last packet is always a packet that is < MAX_PACKET_LENGTH. diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index cabea01c95a..7d0a363be69 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -9526,6 +9526,7 @@ innodb_show_status( const long MAX_STATUS_SIZE = 1048576; ulint trx_list_start = ULINT_UNDEFINED; ulint trx_list_end = ULINT_UNDEFINED; + bool ret_val; DBUG_ENTER("innodb_show_status"); DBUG_ASSERT(hton == innodb_hton_ptr); @@ -9590,12 +9591,13 @@ innodb_show_status( mutex_exit(&srv_monitor_file_mutex); - 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(FALSE); + DBUG_RETURN(ret_val); } /************************************************************************//** From d8bcc6215e5295b99418cc5ba2efdb9ba81d5c18 Mon Sep 17 00:00:00 2001 From: "Sreedhar.S" Date: Wed, 9 Oct 2013 17:08:45 +0530 Subject: [PATCH 051/163] BUG 17560050 - MYSQL_INSTALL_DB SCRIPT FAILING WITH RESOLVEIP ISSUES. --- scripts/CMakeLists.txt | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index d5a3311d942..16d820e147e 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -198,18 +198,24 @@ ELSE() SET(localstatedir ${MYSQL_DATADIR}) ENDIF() -IF(NOT WIN32) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.pl.in - ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY) +IF(UNIX) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh + ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY) SET(DEST ${INSTALL_SCRIPTDIR}) - - INSTALL_SCRIPT( - "${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db" - DESTINATION ${DEST} - COMPONENT Server - ) + SET(EXT) +ELSE() + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.pl.in + ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db.pl ESCAPE_QUOTES @ONLY) + SET(DEST ${INSTALL_SCRIPTDIR}) + SET(EXT ".pl") ENDIF() +INSTALL_SCRIPT( + "${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db${EXT}" + DESTINATION ${DEST} + COMPONENT Server + ) + SET(prefix "${CMAKE_INSTALL_PREFIX}") SET(sysconfdir ${prefix}) SET(bindir ${prefix}/${INSTALL_BINDIR}) From 0e2689310119e0780b3dc3a5c95677fcbc18fb0d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Oct 2013 18:42:27 +0530 Subject: [PATCH 052/163] From 3399194cefc7fcffcba4c304bbb3badec1afc21e Mon Sep 17 00:00:00 2001 From: Nuno Carvalho Date: Mon, 14 Oct 2013 15:45:12 +0100 Subject: [PATCH 053/163] WL#7266: Dump-thread additional concurrency tests This worklog aims at testing the two following scenarios: 1) 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. 2) Verify dump thread can send events in active file, correctly after encountering an IO error. --- .../rpl/r/rpl_dump_events_twice_bug.result | 15 ++++++ .../rpl/r/rpl_lost_events_on_rotate.result | 14 +++++ .../rpl/t/rpl_dump_events_twice_bug.test | 28 ++++++++++ .../rpl/t/rpl_lost_events_on_rotate.test | 51 +++++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_dump_events_twice_bug.result create mode 100644 mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result create mode 100644 mysql-test/suite/rpl/t/rpl_dump_events_twice_bug.test create mode 100644 mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test diff --git a/mysql-test/suite/rpl/r/rpl_dump_events_twice_bug.result b/mysql-test/suite/rpl/r/rpl_dump_events_twice_bug.result new file mode 100644 index 00000000000..8e6c8c122b5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_dump_events_twice_bug.result @@ -0,0 +1,15 @@ +include/master-slave.inc +[connection master] +CALL mtr.add_suppression("Failed to read an event from active binlog.*"); +SET @debug_saved= @@GLOBAL.DEBUG; +CREATE TABLE t1(c1 INT); +INSERT INTO t1 VALUES(1); +[connection master] +SET GLOBAL debug='+d,dump_fake_io_error'; +INSERT INTO t1 VALUES(2); +INSERT INTO t1 VALUES(3); +include/diff_tables.inc [master:t1, slave:t1] +[connection master] +SET @@GLOBAL.DEBUG= @debug_saved; +DROP TABLE t1; +include/rpl_end.inc 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..eee2effccea --- /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; +CREATE TABLE t (i INT); +SET GLOBAL DEBUG= "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= @debug_saved; +SET DEBUG_SYNC= 'RESET'; +DROP TABLE t; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_dump_events_twice_bug.test b/mysql-test/suite/rpl/t/rpl_dump_events_twice_bug.test new file mode 100644 index 00000000000..de82769010e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_dump_events_twice_bug.test @@ -0,0 +1,28 @@ +# +# Verify dump thread can send events in active file, correctly after +# encountering an IO error. +# +--source include/have_debug.inc +--source include/master-slave.inc + +CALL mtr.add_suppression("Failed to read an event from active binlog.*"); +SET @debug_saved= @@GLOBAL.DEBUG; + +CREATE TABLE t1(c1 INT); +INSERT INTO t1 VALUES(1); + +--sync_slave_with_master + +--source include/rpl_connection_master.inc +SET GLOBAL debug='+d,dump_fake_io_error'; +INSERT INTO t1 VALUES(2); +INSERT INTO t1 VALUES(3); + +--sync_slave_with_master +--let $diff_tables= master:t1, slave:t1 +--source include/diff_tables.inc + +--source include/rpl_connection_master.inc +SET @@GLOBAL.DEBUG= @debug_saved; +DROP TABLE t1; +--source include/rpl_end.inc 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..08884ee8e26 --- /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; + +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= "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= @debug_saved; +SET DEBUG_SYNC= 'RESET'; + +DROP TABLE t; +--source include/rpl_end.inc From 821249420e0a9c4e0ba71ce974ed515adef504f6 Mon Sep 17 00:00:00 2001 From: "Sreedhar.S" Date: Wed, 16 Oct 2013 11:05:20 +0530 Subject: [PATCH 054/163] Fix for Bug 17584523 - LICENSE AND DOCUMENTATION FILES MISSING FROM WINDOWS MSI PACKAGE --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f46c671f3f..2a85f630d21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -449,7 +449,6 @@ ADD_SUBDIRECTORY(packaging/solaris) # (see http://public.kitware.com/Bug/view.php?id=11452) SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "") -INCLUDE(CPack) IF(UNIX) INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info) ENDIF() @@ -482,3 +481,5 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") PATTERN "sp-imp-spec.txt" EXCLUDE ) ENDIF() + +INCLUDE(CPack) From 4522a8704fcfdc392fce408ebeb25e3f40060ec7 Mon Sep 17 00:00:00 2001 From: Sujatha Sivakumar Date: Wed, 16 Oct 2013 11:49:00 +0530 Subject: [PATCH 055/163] Bug#17429677:LAST ARGUMENT OF LOAD DATA ...SET ...STATEMENT REPEATED TWICE IN BINLOG Problem: ======= If LOAD DATA ... SET ... is used the last argument of SET is repeated twice in replication binlog. Analysis: ======== LOAD DATA statements are reconstructed once again before they are written to the binary log. When SET clauses are specified as part of LOAD DATA statement, these SET clause user command strings need to be stored in order to rebuild the original user command. During parsing each column and the value in the SET command are stored in two differenet lists. All the values are stored in a string list. When SET expression has more than one value as shown in the following example: SET a = @a, b = CONCAT(@b, '| 123456789'); Parser extracts values in the following manner i.e Item name , value string, actual length of the value of the item with in the string. Item a: Value for a:"= @a, b = CONCAT(@b, '| 123456789') str_length = 4 Item b: Value for b:"= CONCAT(@b, '| 123456789') str_length = 27 During reconstructing the LOAD DATA command the above strings are retrived as it is and appended to the LOAD DATA statement. Hence it becomes as shown below. SET `a`= @a, b = CONCAT(@b, '| 123456789'), `b`= CONCAT(@b, '| 123456789') Fix: === During reconstruction of SET command, retrieve exact item value string rather than reading the entire string. sql/sql_load.cc: Added code to extract the exact Item value. --- sql/sql_load.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 2e85cb105b0..b593412c559 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -738,8 +738,16 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex, if (n++) pfields.append(", "); append_identifier(thd, &pfields, item->name, strlen(item->name)); + // Extract exact Item value + str->copy(); pfields.append((char *)str->ptr()); + str->free(); } + /* + Clear the SET string list once the SET command is reconstructed + as we donot require the list anymore. + */ + thd->lex->load_set_str_list.empty(); } p= pfields.c_ptr_safe(); From de0e8a02d18b4593e11b282b7c8641603b7cbfe9 Mon Sep 17 00:00:00 2001 From: Venkata Sidagam Date: Wed, 16 Oct 2013 14:14:44 +0530 Subject: [PATCH 056/163] Bug#16900358 FIX FOR CVE-2012-5611 IS INCOMPLETE Description: Fix for bug CVE-2012-5611 (bug 67685) is incomplete. The ACL_KEY_LENGTH-sized buffers in acl_get() and check_grant_db() can be overflown by up to two bytes. That's probably not enough to do anything more serious than crashing mysqld. Analysis: In acl_get() when "copy_length" is calculated it just adding the variable lengths. But when we are using them with strmov() we are adding +1 to each. This will lead to a three byte buffer overflow (i.e two +1's at strmov() and one byte for the null added by strmov() function). Similarly it happens for check_grant_db() function as well. Fix: We need to add "+2" to "copy_length" in acl_get() and "+1" to "copy_length" in check_grant_db(). --- sql/sql_acl.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 2458a7120da..cf150439391 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1363,7 +1363,8 @@ ulong acl_get(const char *host, const char *ip, copy_length= (size_t) (strlen(ip ? ip : "") + strlen(user ? user : "") + - strlen(db ? db : "")); + strlen(db ? db : "")) + 2; /* Added 2 at the end to avoid + buffer overflow at strmov()*/ /* Make sure that strmov() operations do not result in buffer overflow. */ @@ -4353,7 +4354,8 @@ bool check_grant_db(THD *thd,const char *db) size_t copy_length; copy_length= (size_t) (strlen(sctx->priv_user ? sctx->priv_user : "") + - strlen(db ? db : "")); + strlen(db ? db : "")) + 1; /* Added 1 at the end to avoid + buffer overflow at strmov()*/ /* Make sure that strmov() operations do not result in buffer overflow. From 2b07397b2021ce598f0bde23a15b1e7983722463 Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Wed, 16 Oct 2013 22:12:23 +0530 Subject: [PATCH 057/163] Bug#17234370 LAST_INSERT_ID IS REPLICATED INCORRECTLY IF REPLICATION FILTERS ARE USED. Problem: When Filtered-slave applies Int_var_log_event and when it tries to write the event to its own binlog, LAST_INSERT_ID value is written wrongly. Analysis: THD::stmt_depends_on_first_successful_insert_id_in_prev_stmt is a variable which is set when LAST_INSERT_ID() is used by a statement. If it is set, first_successful_insert_id_in_ prev_stmt_for_binlog will be stored in the statement-based binlog. This variable is CUMULATIVE along the execution of a stored function or trigger: if one substatement sets it to 1 it will stay 1 until the function/trigger ends, thus making sure that first_successful_insert_id_in_ prev_stmt_for_binlog does not change anymore and is propagated to the caller for binlogging. This is achieved using the following code if(!stmt_depends_on_first_successful_insert_id_in_prev_stmt) { /* It's the first time we read it */ first_successful_insert_id_in_prev_stmt_for_binlog= first_successful_insert_id_in_prev_stmt; stmt_depends_on_first_successful_insert_id_in_prev_stmt= 1; } Slave server, after receiving Int_var_log_event event from master, it is setting stmt_depends_on_first_successful_insert_id_in_prev_stmt to true(*which is wrong*) and not setting first_successful_insert_id_in_prev_stmt_for_binlog. Because of this problem, when the actual DML statement with LAST_INSERT_ID() is parsed by slave SQL thread, first_successful_insert_id_in_prev_stmt_for_binlog is not set. Hence the value zero (default value) is written to slave's binlog. Why only *Filtered slave* is effected when the code is in common place: ------------------------------------------------------- In Query_log_event::do_apply_event, THD::stmt_depends_on_first_successful_insert_id_in_prev_stmt is reset to zero at the end of the function. In case of normal slave (No Filters), this variable will be reset. In Filtered slave, Slave SQL thread defers all IRU events's execution until IRU's Query_log event is received. Once it receives Query_log_event it executes all pending IRU events and then it executes Query_log_event. Hence the variable is not getting reset to 0, causing this bug. Fix: As described above, the root cause was setting THD::stmt_depends_on_first_successful_insert_id_in_prev_stmt when Int_var_log_event was executed by a SQL thread. Hence removing the problematic line from the code. --- sql/log_event.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index d7e912cfe1a..7a557c42154 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5397,7 +5397,6 @@ int Intvar_log_event::do_apply_event(Relay_log_info const *rli) 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= val; break; case INSERT_ID_EVENT: From 1b199c144dee341833cb6c4e28721f5db67a1f74 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Oct 2013 17:59:45 +0530 Subject: [PATCH 058/163] From 7c3d3f192ed893ae0990aeeedf4d0307084c77bf Mon Sep 17 00:00:00 2001 From: Anil Toshniwal Date: Thu, 17 Oct 2013 18:09:04 +0530 Subject: [PATCH 059/163] Bug#17513737 INTRODUCE CHECK TABLE...QUICK --Implemented CHECK TABLE...QUICK. Introduce CHECK TABLE...QUICK that would skip the btr_validate_index() and btr_search_validate() call, and count the no. of records in each index. Approved by Marko and Kevin. (rb#3567). --- include/my_check_opt.h | 69 ++++++++++++++++++++++++++ include/myisam.h | 47 +----------------- storage/innobase/dict/dict0dict.c | 2 + storage/innobase/handler/ha_innodb.cc | 70 ++++++++++++++++----------- storage/innobase/include/btr0sea.h | 2 - 5 files changed, 113 insertions(+), 77 deletions(-) create mode 100644 include/my_check_opt.h diff --git a/include/my_check_opt.h b/include/my_check_opt.h new file mode 100644 index 00000000000..7b064f69ef1 --- /dev/null +++ b/include/my_check_opt.h @@ -0,0 +1,69 @@ +/* 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_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL) + +#ifdef __cplusplus +} +#endif +#endif diff --git a/include/myisam.h b/include/myisam.h index dc9eac8f100..bf94fd7d8cd 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -33,7 +33,7 @@ extern "C" { #endif #include "my_compare.h" #include - +#include /* Limit max keys according to HA_MAX_POSSIBLE_KEY */ @@ -311,51 +311,6 @@ extern uint mi_get_pointer_length(ulonglong file_length, uint def); #define MYISAMCHK_REPAIR 1 /* equivalent to myisamchk -r */ #define MYISAMCHK_VERIFY 2 /* Verify, run repair if failure */ -/* - Definitions needed for myisamchk.c - - Entries marked as "QQ to be removed" are NOT used to - pass check/repair options to mi_check.c. They are used - internally by myisamchk.c or/and ha_myisam.cc and should NOT - be stored together with other flags. They should be removed - from the following list to make addition of new flags possible. -*/ - -#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 /* QQ to be removed */ -#define T_CHECK_ONLY_CHANGED 32 /* QQ to be removed */ -#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) /* QQ to be removed */ -#define T_FORCE_CREATE (1L << 11) /* QQ to be removed */ -#define T_FORCE_UNIQUENESS (1L << 12) -#define T_INFO (1L << 13) -#define T_MEDIUM (1L << 14) -#define T_QUICK (1L << 15) /* QQ to be removed */ -#define T_READONLY (1L << 16) /* QQ to be removed */ -#define T_REP (1L << 17) -#define T_REP_BY_SORT (1L << 18) /* QQ to be removed */ -#define T_REP_PARALLEL (1L << 19) /* QQ to be removed */ -#define T_RETRY_WITHOUT_QUICK (1L << 20) -#define T_SAFE_REPAIR (1L << 21) -#define T_SILENT (1L << 22) -#define T_SORT_INDEX (1L << 23) /* QQ to be removed */ -#define T_SORT_RECORDS (1L << 24) /* QQ to be removed */ -#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_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL) - /* Flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed to mi_check.c follows: diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index 1fe7000f718..546794be26c 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -4485,6 +4485,8 @@ dict_update_statistics( dict_index_t* index; ulint sum_of_index_sizes = 0; + DBUG_EXECUTE_IF("skip_innodb_statistics", return;); + if (table->ibd_file_missing) { ut_print_timestamp(stderr); fprintf(stderr, diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 7d0a363be69..546b0b8905b 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -53,6 +53,7 @@ this program; if not, write to the Free Software Foundation, Inc., #include #include #include +#include /** @file ha_innodb.cc */ @@ -8466,8 +8467,7 @@ 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; @@ -8524,11 +8524,6 @@ ha_innobase::check( do additional check */ prebuilt->table->corrupted = FALSE; - /* Enlarge the fatal lock wait timeout during CHECK TABLE. */ - mutex_enter(&kernel_mutex); - srv_fatal_semaphore_wait_threshold += SRV_SEMAPHORE_WAIT_EXTENSION; - mutex_exit(&kernel_mutex); - for (index = dict_table_get_first_index(prebuilt->table); index != NULL; index = dict_table_get_next_index(index)) { @@ -8541,21 +8536,42 @@ ha_innobase::check( /* If this is an index being created, break */ 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, - prebuilt->index->name, TRUE); - - push_warning_printf(thd, MYSQL_ERROR::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. */ + mutex_enter(&kernel_mutex); + srv_fatal_semaphore_wait_threshold += + SRV_SEMAPHORE_WAIT_EXTENSION; + mutex_exit(&kernel_mutex); + + ibool valid = TRUE; + valid = btr_validate_index(index, prebuilt->trx); + + /* Restore the fatal lock wait timeout after + CHECK TABLE. */ + mutex_enter(&kernel_mutex); + srv_fatal_semaphore_wait_threshold -= + SRV_SEMAPHORE_WAIT_EXTENSION; + mutex_exit(&kernel_mutex); + + if (!valid) { + is_ok = FALSE; + + innobase_format_name( + index_name, sizeof index_name, + index->name, TRUE); + push_warning_printf(thd, + MYSQL_ERROR::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 @@ -8658,21 +8674,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 */ +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG + /* 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 (!(check_opt->flags & T_QUICK) && !btr_search_validate()) { push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_NOT_KEYFILE, "InnoDB: The adaptive hash index is corrupted."); is_ok = FALSE; } - - /* Restore the fatal lock wait timeout after CHECK TABLE. */ - mutex_enter(&kernel_mutex); - srv_fatal_semaphore_wait_threshold -= SRV_SEMAPHORE_WAIT_EXTENSION; - mutex_exit(&kernel_mutex); - +#endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ prebuilt->trx->op_info = ""; if (thd_killed(user_thd)) { my_error(ER_QUERY_INTERRUPTED, MYF(0)); diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h index 0ee68101ee7..081dc88435e 100644 --- a/storage/innobase/include/btr0sea.h +++ b/storage/innobase/include/btr0sea.h @@ -188,8 +188,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 */ From 863d67e3acbc31951c9cf52cd49be1eb8e1e28b8 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Thu, 17 Oct 2013 17:48:26 +0100 Subject: [PATCH 060/163] BUG#17460821: ASSERTION ERROR WHEN STOPPING SLAVE AFTER SEMI-SYNC ON MASTER IS DISABLED The assertion happens when: (i) the master and slave are configured to use the semisync plugin; (ii) the DBA disables semisync on the master; (iii) and he also unsets the option to wait for slaves ACK even if the semisync slave count reaches 0 during the waiting period. This combination of factors makes the server run into an assertion as soon as the last semisync slave disconnects and its dump thread exits. The root of the problem is the fact that when the dump thread disconnects and calls the observer hook transmit_stop, which ends up calling ReplSemiSyncMaster::remove_slave, there is no check whether the master has already disabled semisync or not. If it has, the then a second call to the switch_off member function must be avoided. The quick fix is to avoid calling switch_off if the DBA has disabled the semisync plugin interactively on the master. Also, the switch_off member function should only be called if the plugin has not been switched off already. This is basically the pattern throughout the rest of the semisync plugin and no other calls seem vulnerable to similar crashes/assertions. (This a backport of the patch to 5.5, which is also vulnerable.) --- plugin/semisync/semisync_master.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index 6b8bb915445..2e40fc8b5c5 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -482,13 +482,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(); } From cd6f3b55dab602069f43ed08fd3949d1226c2c50 Mon Sep 17 00:00:00 2001 From: Aditya A Date: Fri, 18 Oct 2013 12:26:28 +0530 Subject: [PATCH 061/163] Bug#17559867 AFTER REBUILDING,A MYISAM PARTITION ENDS UP AS A INNODB PARTITTION. PROBLEM ------- The correct engine_type was not being set during rebuild of the partition due to which the handler was always created with the default engine, which is innodb for 5.5+ ,therefore even if the table was myisam, after rebuilding the partitions ended up as innodb partitions. FIX --- Set the correct engine type during rebuild. [Approved by mattiasj #rb3599] --- sql/sql_partition.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index a3ad138043c..aa367abe22a 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -4725,6 +4725,8 @@ that are reorganised. { uint no_parts_found; uint no_parts_opt= alter_info->partition_names.elements; + set_engine_all_partitions(tab_part_info, + tab_part_info->default_engine_type); no_parts_found= set_part_state(alter_info, tab_part_info, PART_CHANGED); if (no_parts_found != no_parts_opt && (!(alter_info->flags & ALTER_ALL_PARTITION))) From 18079ac9b82a3af4e0686a8da58499523e5677ef Mon Sep 17 00:00:00 2001 From: Anirudh Mangipudi Date: Fri, 18 Oct 2013 17:14:39 +0530 Subject: [PATCH 062/163] Bug #17357535 BACKPORT BUG#16241992 TO 5.5 Problem: COM_CHANGE_USER allows brute-force attempts to crack a password at a very high rate as it does not cause any significant delay after a login attempt has failed. This issue was reproduced using John-The-Ripper password cracking tool through which about 5000 passwords per second could be attempted. Solution: The non-GA version's solution was to disconnect the connection when a login attempt failed. Now since our aim to to reduce the rate at which passwords are tested, we introduced a sleep(1) after every login attempt failed. This significantly increased the delay with which the password was cracked. --- sql/sql_parse.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f787fe4058f..6e2b422bd44 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -971,6 +971,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->variables.collation_connection= save_collation_connection; thd->variables.character_set_results= save_character_set_results; thd->update_charset(); + sleep(1); } else { From 20f579ea162afd751576e9ed6ab8c8a49eb833f1 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Fri, 18 Oct 2013 19:25:59 +0200 Subject: [PATCH 063/163] Bug#17565888: UP TO 75% INCREASE IN DBT3 QUERY (Q7) EXECUTION TIME Regression from bug#14621190 due to disabled optimistic restoration of cursor, which required full key lookup instead of verifying if previously positioned btree cursor could be reused. Fixed by enable optimistic restore and adjust cursor afterward. rb#3324 approved by Marko. --- storage/innobase/btr/btr0pcur.c | 44 ++++++-------- storage/innobase/include/btr0pcur.h | 44 ++++++++------ storage/innobase/include/btr0pcur.ic | 7 ++- storage/innobase/row/row0sel.c | 91 +++++++++++++++++----------- 4 files changed, 102 insertions(+), 84 deletions(-) diff --git a/storage/innobase/btr/btr0pcur.c b/storage/innobase/btr/btr0pcur.c index fbedc1e7d04..d8f43a9ae75 100644 --- a/storage/innobase/btr/btr0pcur.c +++ b/storage/innobase/btr/btr0pcur.c @@ -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); @@ -235,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)) { @@ -273,29 +264,26 @@ btr_pcur_restore_position_func( if (UNIV_LIKELY(latch_mode == BTR_SEARCH_LEAF) || UNIV_LIKELY(latch_mode == BTR_MODIFY_LEAF)) { - /* Try optimistic restoration if cursor is expected to be - positioned on the same btr record as before (BTR_PCUR_ON). */ + /* Try optimistic restoration. */ - if (cursor->rel_pos == BTR_PCUR_ON - && buf_page_optimistic_get( - latch_mode, - cursor->block_when_stored, - cursor->modify_clock, - file, line, mtr)) { - cursor->pos_state = BTR_PCUR_IS_POSITIONED; + if (buf_page_optimistic_get(latch_mode, + cursor->block_when_stored, + cursor->modify_clock, + file, line, mtr)) { buf_block_dbg_add_level( btr_pcur_get_block(cursor), dict_index_is_ibuf(index) ? SYNC_IBUF_TREE_NODE : SYNC_TREE_NODE); - { + if (cursor->rel_pos == BTR_PCUR_ON) { #ifdef UNIV_DEBUG const rec_t* rec; const ulint* offsets1; const ulint* offsets2; #endif /* UNIV_DEBUG */ cursor->latch_mode = latch_mode; + cursor->pos_state = BTR_PCUR_IS_POSITIONED; #ifdef UNIV_DEBUG rec = btr_pcur_get_rec(cursor); @@ -314,6 +302,11 @@ 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. */ + cursor->pos_state = BTR_PCUR_IS_POSITIONED_OPTIMISTIC; + return(FALSE); } } @@ -414,7 +407,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)); @@ -469,7 +462,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/include/btr0pcur.h b/storage/innobase/include/btr0pcur.h index 4312f73ca4a..d9ce02283d7 100644 --- a/storage/innobase/include/btr0pcur.h +++ b/storage/innobase/include/btr0pcur.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 @@ -447,6 +447,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. */ @@ -480,10 +501,8 @@ struct btr_pcur_struct{ 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; @@ -499,21 +518,6 @@ struct btr_pcur_struct{ 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 696dfc728dc..5eb8ed0f32d 100644 --- a/storage/innobase/include/btr0pcur.ic +++ b/storage/innobase/include/btr0pcur.ic @@ -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 @@ -309,7 +309,8 @@ btr_pcur_move_to_next_user_rec( function may release the page latch */ mtr_t* mtr) /*!< in: mtr */ { - ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC + || cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; loop: @@ -379,7 +380,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/row/row0sel.c b/storage/innobase/row/row0sel.c index 28da1f69e8a..c8e293080c1 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -3095,55 +3095,76 @@ 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); } +#endif - /* success can only be TRUE for BTR_PCUR_ON! */ - ut_ad(!success); + /* The position may need be adjusted for rel_pos and moves_up. */ - /* BTR_PCUR_BEFORE -> the position is now set to the record before - pcur->old_rec. - BTR_PCUR_AFTER-> positioned to record after pcur->old_rec. */ - - if (relative_position == BTR_PCUR_AFTER - || relative_position == BTR_PCUR_AFTER_LAST_IN_TREE) { - - 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); } From e6a734a7cf1fd678fbc22a9d920efac0bc601123 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Fri, 18 Oct 2013 23:39:15 +0200 Subject: [PATCH 064/163] post-push fix for bug17565888. Too restrictive assertion, can fail during purge --- storage/innobase/include/btr0pcur.ic | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.ic index 5eb8ed0f32d..f5880e0564a 100644 --- a/storage/innobase/include/btr0pcur.ic +++ b/storage/innobase/include/btr0pcur.ic @@ -164,7 +164,8 @@ btr_pcur_is_after_last_on_page( /*===========================*/ const btr_pcur_t* cursor) /*!< in: persistent cursor */ { - ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC + || cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); return(page_cur_is_after_last(btr_pcur_get_page_cur(cursor))); From a91fcaf460f686b1fb7eb005fa22ab136ff7210d Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Fri, 18 Oct 2013 23:49:35 +0200 Subject: [PATCH 065/163] post-push fix for bug17565888. Too restrictive assertion, failing during purge --- storage/innobase/include/btr0pcur.ic | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.ic index f5880e0564a..db3145132af 100644 --- a/storage/innobase/include/btr0pcur.ic +++ b/storage/innobase/include/btr0pcur.ic @@ -91,7 +91,8 @@ btr_pcur_get_block( /*===============*/ const btr_pcur_t* cursor) /*!< in: persistent cursor */ { - ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC + || cursor->pos_state == BTR_PCUR_IS_POSITIONED); return(btr_cur_get_block(btr_pcur_get_btr_cur(cursor))); } From 7a524cee32e3a7d457fa6a0e86351ddac1c219fb Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Sat, 19 Oct 2013 15:29:51 +0200 Subject: [PATCH 066/163] post-push fix for bug17565888. --- storage/innobase/btr/btr0pcur.c | 2 +- storage/innobase/include/btr0pcur.ic | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/storage/innobase/btr/btr0pcur.c b/storage/innobase/btr/btr0pcur.c index d8f43a9ae75..ea187305656 100644 --- a/storage/innobase/btr/btr0pcur.c +++ b/storage/innobase/btr/btr0pcur.c @@ -270,6 +270,7 @@ btr_pcur_restore_position_func( cursor->block_when_stored, cursor->modify_clock, file, line, mtr)) { + cursor->pos_state = BTR_PCUR_IS_POSITIONED; buf_block_dbg_add_level( btr_pcur_get_block(cursor), @@ -283,7 +284,6 @@ btr_pcur_restore_position_func( const ulint* offsets2; #endif /* UNIV_DEBUG */ cursor->latch_mode = latch_mode; - cursor->pos_state = BTR_PCUR_IS_POSITIONED; #ifdef UNIV_DEBUG rec = btr_pcur_get_rec(cursor); diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.ic index db3145132af..647e8d0cde9 100644 --- a/storage/innobase/include/btr0pcur.ic +++ b/storage/innobase/include/btr0pcur.ic @@ -91,8 +91,7 @@ btr_pcur_get_block( /*===============*/ const btr_pcur_t* cursor) /*!< in: persistent cursor */ { - ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC - || cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); return(btr_cur_get_block(btr_pcur_get_btr_cur(cursor))); } @@ -165,8 +164,7 @@ btr_pcur_is_after_last_on_page( /*===========================*/ const btr_pcur_t* cursor) /*!< in: persistent cursor */ { - ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC - || cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); return(page_cur_is_after_last(btr_pcur_get_page_cur(cursor))); @@ -311,8 +309,7 @@ btr_pcur_move_to_next_user_rec( function may release the page latch */ mtr_t* mtr) /*!< in: mtr */ { - ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED_OPTIMISTIC - || cursor->pos_state == BTR_PCUR_IS_POSITIONED); + ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->latch_mode != BTR_NO_LATCHES); cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; loop: From c5896384bda582ec6f43ceb3fe9e7530e0bf819d Mon Sep 17 00:00:00 2001 From: Aditya A Date: Mon, 21 Oct 2013 12:07:02 +0530 Subject: [PATCH 067/163] Bug #16051817 GOT ERROR 124 FROM STORAGE ENGINE ON DELETE FROM A PARTITIONED TABLE PROBLEM ------- The user first disables all the non unique indexes in the table and then rebuilds one partition. During rebuild the indexes on that particular partition are enabled. Now when we give a query the optimizer is unaware that on one partition indexes are enabled and if the optimizer selects that index,myisam thinks that the index is not active and gives an error. FIX --- Before rebuilding a partition check whether non unique indexes are disabled on the partitons. If they are disabled then after rebuild disable the index on the partition. [Approved by Mattiasj #rb3469] --- sql/ha_partition.cc | 23 ++++++++++++++++++++--- sql/ha_partition.h | 3 ++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index c3f2af27282..507f202e349 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1337,7 +1337,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"); @@ -1362,6 +1363,7 @@ int ha_partition::prepare_new_partition(TABLE *tbl, if ((error= file->ha_open(tbl, part_name, m_mode, m_open_test_lock))) 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() @@ -1372,6 +1374,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->close(); @@ -1649,6 +1654,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(); @@ -1683,11 +1696,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); } @@ -1700,11 +1715,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]; } } diff --git a/sql/ha_partition.h b/sql/ha_partition.h index eef93e056ef..153e610d86f 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -270,7 +270,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, rename_table and create uses very similar logic which is packed into this routine. From 63a205d4a00670298f0c3568ba7af8c5a1b3fee2 Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Mon, 21 Oct 2013 13:14:46 +0200 Subject: [PATCH 068/163] Bug#17632386: WITH_ASAN CONFLICTS WITH -WL,--NO-UNDEFINED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Wl,--no-undefined (=-z defs) gives linking errors when used with WITH_ASAN. According to the documentation: "When linking shared libraries, the AddressSanitizer run-time is not linked, so -Wl,-z,defs may cause link errors (don’t use it with AddressSanitizer)." This patch turns off -Wl,--no-undefined if WITH_ASAN is used. --- cmake/os/Linux.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake index 61361d1d48b..5a1bd2f2d0d 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 @@ -33,7 +33,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) From 0121bdc8d40bc57d8cc19fb805f8ab5f5103a874 Mon Sep 17 00:00:00 2001 From: sayantan dutta Date: Fri, 25 Oct 2013 11:38:34 +0530 Subject: [PATCH 069/163] Bug #17654275 - MTR EXTRACT_WARNING_LINES IS NOT REMOVING TIMESTAMP IN UTC FORMAT WITH TIMEZONES --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 54dcd982a4c..27f99941637 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4353,7 +4353,7 @@ sub extract_warning_lines ($$) { { # Remove initial timestamp and look for consecutive identical lines my $line_pat= $line; - $line_pat =~ s/^[0-9: ]*//; + $line_pat =~ s/^[0-9:\-\+\.TZ ]*//; if ($line_pat eq $last_pat) { $num_rep++; } else { From 1aa1eb912d73253c61d9fcf5b7db54a5e09c83a0 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Oct 2013 09:42:59 +0100 Subject: [PATCH 070/163] From 6d483cf3abb093546fbea512019258ffaed3aac5 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Mon, 28 Oct 2013 17:08:31 +0100 Subject: [PATCH 071/163] post-push fix for bug#17565888/bug#14621190 --- storage/innobase/btr/btr0pcur.c | 10 +++++----- storage/innobase/row/row0sel.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/storage/innobase/btr/btr0pcur.c b/storage/innobase/btr/btr0pcur.c index ea187305656..09b3715e096 100644 --- a/storage/innobase/btr/btr0pcur.c +++ b/storage/innobase/btr/btr0pcur.c @@ -124,7 +124,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 (UNIV_UNLIKELY(page_get_n_recs(page) == 0)) { /* It must be an empty index tree; NOTE that in this case @@ -271,6 +270,7 @@ btr_pcur_restore_position_func( 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), @@ -282,9 +282,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); @@ -305,7 +302,10 @@ btr_pcur_restore_position_func( /* This is the same record as stored, may need to be adjusted for BTR_PCUR_BEFORE/AFTER, depending on search mode and direction. */ - cursor->pos_state = BTR_PCUR_IS_POSITIONED_OPTIMISTIC; + if (btr_pcur_is_on_user_rec(cursor)) { + cursor->pos_state + = BTR_PCUR_IS_POSITIONED_OPTIMISTIC; + } return(FALSE); } } diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index c8e293080c1..b8336f88532 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -3108,6 +3108,8 @@ sel_restore_position_for_mysql( || 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 From a44794d05eb03d8ed996281dfee0161c8bd137a7 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Tue, 29 Oct 2013 17:26:20 +0100 Subject: [PATCH 072/163] Bug#17326567 MYSQL SERVER FILESORT IMPLEMENTATION HAS A VERY SERIOUS BUG The filesort implementation needs space for at least 15 records (plus some internal overhead) in its main sort buffer. --- sql/filesort.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sql/filesort.cc b/sql/filesort.cc index 3a2102fa62b..a067f0236ed 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -1,5 +1,5 @@ /* - 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 @@ -216,7 +216,10 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, goto err; memavl= thd->variables.sortbuff_size; - min_sort_memory= max(MIN_SORT_MEMORY, param.sort_length*MERGEBUFF2); + min_sort_memory= + max(MIN_SORT_MEMORY, + ALIGN_SIZE(MERGEBUFF2 * (param.rec_length + sizeof(uchar*)))); + while (memavl >= min_sort_memory) { ulong old_memavl; From f4cf756204c304ebd9b7487409557aefeaad0e0d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Oct 2013 11:39:04 -0500 Subject: [PATCH 073/163] Testcase i_innodb.innodb-alter-restart.test fails on some Windows platforms possibly since it was introduced in the patch for Bug#16720368 around 2013-04-30. This fix is simply to adjust the mtr.add_suppression() lines in the testcase and to add a missing "\n" in the error message. Approved by Marko in RB 3746 --- storage/innobase/fil/fil0fil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c index be7d43c132d..9dfc3bb1d21 100644 --- a/storage/innobase/fil/fil0fil.c +++ b/storage/innobase/fil/fil0fil.c @@ -3531,7 +3531,7 @@ fil_load_single_table_tablespace( if (check_msg) { fprintf(stderr, - "InnoDB: Error: %s in file %s", + "InnoDB: Error: %s in file %s\n", check_msg, filepath); goto func_exit; } From d73f2a82245b80bba8cb41ebf06c43e7fb01791b Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Wed, 30 Oct 2013 04:07:07 +0100 Subject: [PATCH 074/163] Removed non gpl file docs/mysql.info from community packages --- support-files/mysql.spec.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 8fbf9f08b9e..c8b8941af4a 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -956,7 +956,9 @@ fi %doc mysql-release-%{mysql_version}/support-files/ndb-*.ini %endif +%if 0%{?commercial} %doc %attr(644, root, root) %{_infodir}/mysql.info* +%endif %if %{INNODB_BUILD} %doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1* @@ -1195,6 +1197,9 @@ fi # merging BK trees) ############################################################################## %changelog +* Wed Oct 30 2013 Balasubramanian Kandasamy +- Removed non gpl file docs/mysql.info from community packages + * Mon Sep 09 2013 Balasubramanian Kandasamy - Updated logic to get the correct count of PID files From 6e059fd16df1903945769fac303a6568a0fffa3e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2013 09:01:09 +0530 Subject: [PATCH 075/163] From 19990c92197c64588ac489fda6c23e34702d7db0 Mon Sep 17 00:00:00 2001 From: Venkata Sidagam Date: Thu, 31 Oct 2013 23:02:44 +0530 Subject: [PATCH 076/163] Bug #12917164 DROP USER CAN'T DROP USERS WITH LEGACY UPPER CASE HOST NAME ANYMORE Description: It is not possible to drop users with host names with upper case letters in them. i.e DROP USER 'root'@'Tmp_Host_Name'; is failing with error. Analysis: Since the fix 11748570 we came up with lower case hostnames as standard. But in the current bug the hostname is created by mysql_install_db script is still having upper case hostnames. So, if we have the hostname with upper case letters like(Tmp_Host_Name) then we will have as it is stored in the mysql.user table. In this case if use "'DROP USER 'root'@'Tmp_Host_Name';" it gives error because we do compare with the lower case of hostname since the 11748570 fix. Fix: We need to convert the hostname to lower case before storing into the mysql.user table when we run the mysql_install_db script. --- scripts/mysql_system_tables_data.sql | 7 +++---- scripts/mysql_system_tables_fix.sql | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql index 7203e250656..82b185ebefc 100644 --- a/scripts/mysql_system_tables_data.sql +++ b/scripts/mysql_system_tables_data.sql @@ -25,8 +25,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 @@ -42,9 +41,9 @@ 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','','','','',0,0,0,0); -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','','','','',0,0,0,0 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','','','','',0,0,0,0 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','','','','',0,0,0,0); 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/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 09f66c79c3f..56f6a64211a 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -601,6 +601,9 @@ ALTER TABLE db MODIFY Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0; +# Convering the host name to lower case for existing users +UPDATE user SET host=LOWER( host ) WHERE LOWER( host ) <> host; + # Activate the new, possible modified privilege tables # This should not be needed, but gives us some extra testing that the above # changes was correct From e87a37a2de41c6d0316fe501a33b57fa9a382abb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2013 22:53:56 +0000 Subject: [PATCH 077/163] From 2c4ac8e0935297f7fae9e0711f859687e1546435 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Nov 2013 13:48:24 +0530 Subject: [PATCH 078/163] From e0f3a0fae98bea144b962ef8dbbe62e0935aebb1 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Fri, 1 Nov 2013 16:39:19 +0100 Subject: [PATCH 079/163] Bug#17617945 BUFFER OVERFLOW IN GET_MERGE_MANY_BUFFS_COST WITH SMALL SORT_BUFFER_SIZE get_cost_calc_buff_size() could return wrong value for the size of imerge_cost_buff. --- sql/sql_class.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/sql_class.h b/sql/sql_class.h index 9a9b2058e2b..fd83930a8e9 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2987,11 +2987,13 @@ public: bool get(TABLE *table); static double get_use_cost(uint *buffer, uint nkeys, uint key_size, ulonglong max_in_memory_size); + + // Returns the number of bytes needed in imerge_cost_buf. inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size, ulonglong max_in_memory_size) { register ulonglong max_elems_in_tree= - (1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size)); + (max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size)); return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree)); } From 5caddbfd5b4a7ec377f3d40a5830436e0e6e993b Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Tue, 5 Nov 2013 08:03:43 +0100 Subject: [PATCH 080/163] Removed non gpl file mysql.info from uln community package --- packaging/rpm-uln/mysql.spec.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 +- Removed non gpl file mysql.info from community packages + * Wed Jul 10 2013 Balasubramanian Kandasamy - Removed directory /usr/share/mysql/solaris/postinstall-solaris to resolve build error From 4d6ee2d1197c0e5ebecd019d6625d7d05bf1cab8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Dec 2013 14:36:09 +0100 Subject: [PATCH 081/163] MDEV-5363: Make parallel replication waits killable Make wait_for_prior_commit killable, and handle the error if killed. --- sql/log.cc | 46 ++++++++++++++++++++++++++++++++++----------- sql/log.h | 2 +- sql/rpl_parallel.cc | 2 +- sql/sql_class.cc | 21 ++++++++++++++++++--- sql/sql_class.h | 13 ++++--------- 5 files changed, 59 insertions(+), 25 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index ee7e22cbe0c..9cddb5a8e75 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -6612,12 +6612,13 @@ 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; @@ -6641,6 +6642,7 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) /* Do an extra check here, this time safely under lock. */ if (wfc->waiting_for_commit) { + const char *old_msg; /* 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 @@ -6651,16 +6653,36 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) queued_by_other flag is set. */ wfc->opaque_pointer= orig_entry; + old_msg= + orig_entry->thd->enter_cond(&wfc->COND_wait_commit, + &wfc->LOCK_wait_commit, + "Waiting for prior transaction to commit"); DEBUG_SYNC(orig_entry->thd, "group_commit_waiting_for_prior"); - do - { + while (wfc->waiting_for_commit && !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)); + orig_entry->thd->exit_cond(old_msg); + + if (wfc->waiting_for_commit) + { + /* Interrupted by kill. */ + 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); + } + } + else + mysql_mutex_unlock(&wfc->LOCK_wait_commit); + + if (wfc->wakeup_error) + { + my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); + DBUG_RETURN(-1); } - mysql_mutex_unlock(&wfc->LOCK_wait_commit); } /* @@ -6669,7 +6691,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"); @@ -6841,13 +6863,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(); diff --git a/sql/log.h b/sql/log.h index 73518d2594f..45381152d97 100644 --- a/sql/log.h +++ b/sql/log.h @@ -540,7 +540,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(); diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 109db6ef681..0de164483d4 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -142,7 +142,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; /* diff --git a/sql/sql_class.cc b/sql/sql_class.cc index d1edec140b6..1898bae1499 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -5783,13 +5783,28 @@ 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) { + const char *old_msg; + mysql_mutex_lock(&LOCK_wait_commit); - while (waiting_for_commit) + old_msg= thd->enter_cond(&COND_wait_commit, &LOCK_wait_commit, + "Waiting for prior transaction to commit"); + while (waiting_for_commit && !thd->check_killed()) mysql_cond_wait(&COND_wait_commit, &LOCK_wait_commit); - mysql_mutex_unlock(&LOCK_wait_commit); + thd->exit_cond(old_msg); waitee= NULL; + if (!waiting_for_commit) + { + if (wakeup_error) + my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); + return wakeup_error; + } + /* Wait was interrupted by kill, so give the error. */ + wakeup_error= thd->killed_errno(); + if (!wakeup_error) + wakeup_error= ER_QUERY_INTERRUPTED; + my_message(wakeup_error, ER(wakeup_error), MYF(0)); return wakeup_error; } diff --git a/sql/sql_class.h b/sql/sql_class.h index 9f091ac2c2b..083cf0b8c04 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1627,14 +1627,14 @@ 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(); + return wait_for_prior_commit2(thd); else return wakeup_error; } @@ -1663,7 +1663,7 @@ struct wait_for_commit 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(); @@ -3334,12 +3334,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) From b7ae65ef86636e986594d8e44dec83a83311977c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Dec 2013 13:28:23 +0100 Subject: [PATCH 082/163] MDEV-5363: Make parallel replication waits killable A couple of more parallel replication waits made killable. --- sql/rpl_parallel.cc | 48 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 0de164483d4..ff2ad84e037 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -285,21 +285,42 @@ handle_rpl_parallel_thread(void *arg) wait_start_sub_id= rgi->wait_start_sub_id; if (wait_for_sub_id || wait_start_sub_id) { + bool did_enter_cond= false; + const char *old_msg= NULL; + mysql_mutex_lock(&entry->LOCK_parallel_entry); if (wait_start_sub_id) { - while (wait_start_sub_id > entry->last_committed_sub_id) + old_msg= thd->enter_cond(&entry->COND_parallel_entry, + &entry->LOCK_parallel_entry, + "Waiting for prior transaction to commit " + "before starting next transaction"); + did_enter_cond= true; + while (wait_start_sub_id > entry->last_committed_sub_id && + !thd->check_killed()) mysql_cond_wait(&entry->COND_parallel_entry, &entry->LOCK_parallel_entry); + if (wait_start_sub_id > entry->last_committed_sub_id) + { + /* The thread got a kill signal. */ + thd->send_kill_message(); + rgi->is_error= true; + slave_output_error_info(rgi->rli, thd); + rgi->cleanup_context(thd, true); + rgi->rli->abort_slave= true; + } + rgi->wait_start_sub_id= 0; /* No need to check again. */ } - rgi->wait_start_sub_id= 0; /* No need to check again. */ if (wait_for_sub_id > entry->last_committed_sub_id) { 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 (did_enter_cond) + thd->exit_cond(old_msg); + else + mysql_mutex_unlock(&entry->LOCK_parallel_entry); } if(thd->wait_for_commit_ptr) @@ -753,6 +774,8 @@ 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; + const char *old_msg= NULL; /* ToDo: what to do with this lock?!? */ mysql_mutex_unlock(&rli->data_lock); @@ -860,6 +883,13 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, } else if (cur_thread->queued_size <= opt_slave_parallel_max_queued) break; // The thread is ready to queue into + else if (rli->sql_driver_thd->check_killed()) + { + mysql_mutex_unlock(&cur_thread->LOCK_rpl_thread); + my_error(ER_CONNECTION_KILLED, MYF(0)); + delete rgi; + return true; + } else { /* @@ -867,6 +897,13 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, use for queuing events, so wait for the thread to consume some of its queue. */ + if (!did_enter_cond) + { + old_msg= rli->sql_driver_thd->enter_cond + (&cur_thread->COND_rpl_thread, &cur_thread->LOCK_rpl_thread, + "Waiting for room in worker thread event queue"); + did_enter_cond= true; + } mysql_cond_wait(&cur_thread->COND_rpl_thread, &cur_thread->LOCK_rpl_thread); } @@ -1016,7 +1053,10 @@ 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); + if (did_enter_cond) + rli->sql_driver_thd->exit_cond(old_msg); + else + mysql_mutex_unlock(&cur_thread->LOCK_rpl_thread); mysql_cond_signal(&cur_thread->COND_rpl_thread); return false; From dbfe5f4774cf35283f7c7378d25fe881c00103c2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Dec 2013 14:26:51 +0100 Subject: [PATCH 083/163] MDEV-5363: Make parallel replication waits killable Add a test case for killing a waiting query in parallel replication. Fix several bugs found: - We should not wakeup_subsequent_commits() in ha_rollback_trans(), since we do not know the right wakeup_error() to give. - When a wait_for_prior_commit() is killed, we must unregister from the waitee so we do not race and get an extra (non-kill) wakeup. - We need to deal with error propagation correctly in queue_for_group_commit when one thread is killed. - Fix one locking issue in queue_for_group_commit(), we could unlock the waitee lock too early and this end up processing wakeup() with insufficient locking. - Fix Xid_log_event::do_apply_event; if commit fails it must not update the in-memory @@gtid_slave_pos state. - Fix and cleanup some things in the rpl_parallel.cc error handling. - Add a missing check for killed in the slave sql driver thread, to avoid a race. --- mysql-test/suite/rpl/r/rpl_parallel.result | 73 +++++++++++ mysql-test/suite/rpl/t/rpl_parallel.test | 121 ++++++++++++++++++ sql/handler.cc | 8 +- sql/log.cc | 136 ++++++++++++++------- sql/log_event.cc | 2 +- sql/rpl_parallel.cc | 26 ++-- sql/slave.cc | 11 ++ sql/sql_class.cc | 45 ++++--- sql/sql_class.h | 19 +++ 9 files changed, 367 insertions(+), 74 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index 03b102a1af9..d256a609b53 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); @@ -259,6 +260,78 @@ 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 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"); +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,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 +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 include/stop_slave.inc SET GLOBAL slave_parallel_threads=@old_parallel_threads; include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index 5709cab19c0..8a6eddbc2e5 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); @@ -333,6 +334,126 @@ SELECT * FROM t2 WHERE a >= 20 ORDER BY a; 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; + +--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"); +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,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; + + --connection server_2 --source include/stop_slave.inc SET GLOBAL binlog_format=@old_format; diff --git a/sql/handler.cc b/sql/handler.cc index 1518f2baaa0..88431d4db32 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1300,7 +1300,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->wakeup_subsequent_commits(error); + } DBUG_RETURN(0); } @@ -1334,6 +1337,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); } @@ -1421,6 +1425,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) @@ -1591,10 +1596,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; diff --git a/sql/log.cc b/sql/log.cc index 9cddb5a8e75..fbb73acf5d1 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -6622,7 +6622,7 @@ 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"); @@ -6663,17 +6663,39 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) wfc->opaque_pointer= NULL; DBUG_PRINT("info", ("After waiting for prior commit, queued_by_other=%d", orig_entry->queued_by_other)); - orig_entry->thd->exit_cond(old_msg); if (wfc->waiting_for_commit) { - /* Interrupted by kill. */ - 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); + /* Wait terminated due to kill. */ + wait_for_commit *loc_waitee= wfc->waitee; + 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->waiting_for_commit); + } + 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); + + orig_entry->thd->exit_cond(old_msg); + /* 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_msg); } else mysql_mutex_unlock(&wfc->LOCK_wait_commit); @@ -6729,9 +6751,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 (;;) { @@ -6757,11 +6778,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. @@ -6802,18 +6823,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. */ - if (have_lock) - { - have_lock= false; - cur->wakeup_subsequent_commits_running= true; - mysql_mutex_unlock(&cur->LOCK_wait_commit); - } - waiter->wakeup(0); + *wakeup_next_ptr= waiter; + wakeup_next_ptr= &waiter->next_subsequent_commit; } waiter= next; } - if (have_lock) + 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 (&wakeup_list->next_subsequent_commit == wakeup_next_ptr) + { + /* The last one in the list. */ + wakeup_list->wakeup(0); + break; + } + /* + 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; + } + /* + 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; + } + else mysql_mutex_unlock(&cur->LOCK_wait_commit); } if (cur == last) @@ -6827,29 +6898,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); diff --git a/sql/log_event.cc b/sql/log_event.cc index d6c7db1e215..d205a08e708 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -7158,7 +7158,7 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi) 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); /* diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index ff2ad84e037..91aa36abc52 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -24,7 +24,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; @@ -172,6 +172,18 @@ finish_event_group(THD *thd, int err, uint64 sub_id, } +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; + 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(); +} + + pthread_handler_t handle_rpl_parallel_thread(void *arg) { @@ -304,10 +316,8 @@ handle_rpl_parallel_thread(void *arg) { /* The thread got a kill signal. */ thd->send_kill_message(); - 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); } rgi->wait_start_sub_id= 0; /* No need to check again. */ } @@ -363,10 +373,8 @@ handle_rpl_parallel_thread(void *arg) 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) { @@ -405,11 +413,9 @@ handle_rpl_parallel_thread(void *arg) half-processed event group. */ mysql_mutex_unlock(&rpt->LOCK_rpl_thread); - group_rgi->is_error= true; 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; + signal_error_to_sql_driver_thread(thd, group_rgi); in_event_group= false; delete group_rgi; group_rgi= NULL; diff --git a/sql/slave.cc b/sql/slave.cc index 4be4a96d142..bddb69d84bb 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -6241,6 +6241,17 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) rli->ignore_log_space_limit= true; } + /* + 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; + } + /* If the I/O thread is blocked, unblock it. Ok to broadcast after unlock, because the mutex is only destroyed in diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 1898bae1499..11c03191a49 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -5786,25 +5786,49 @@ int wait_for_commit::wait_for_prior_commit2(THD *thd) { const char *old_msg; + wait_for_commit *loc_waitee; mysql_mutex_lock(&LOCK_wait_commit); old_msg= thd->enter_cond(&COND_wait_commit, &LOCK_wait_commit, "Waiting for prior transaction to commit"); while (waiting_for_commit && !thd->check_killed()) mysql_cond_wait(&COND_wait_commit, &LOCK_wait_commit); - thd->exit_cond(old_msg); - waitee= NULL; if (!waiting_for_commit) { if (wakeup_error) my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); - return wakeup_error; + goto end; } - /* Wait was interrupted by kill, so give the error. */ + /* + 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). + */ + loc_waitee= this->waitee; + 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 (waiting_for_commit); + goto end; + } + remove_from_list(&loc_waitee->subsequent_commits_list); + mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit); + wakeup_error= thd->killed_errno(); if (!wakeup_error) wakeup_error= ER_QUERY_INTERRUPTED; my_message(wakeup_error, ER(wakeup_error), MYF(0)); + +end: + thd->exit_cond(old_msg); + waitee= NULL; return wakeup_error; } @@ -5891,7 +5915,6 @@ wait_for_commit::unregister_wait_for_prior_commit2() if (waiting_for_commit) { 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) { @@ -5909,17 +5932,7 @@ wait_for_commit::unregister_wait_for_prior_commit2() 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); } } diff --git a/sql/sql_class.h b/sql/sql_class.h index 083cf0b8c04..a3fc3a7866f 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1660,6 +1660,25 @@ struct wait_for_commit if (waiting_for_commit) 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; + } + waiting_for_commit= false; + } void wakeup(int wakeup_error); From f2c4765c167c3c14355042eb265f2c34bb52652b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Dec 2013 13:48:32 +0100 Subject: [PATCH 084/163] MDEV-5363: Make parallel replication waits killable Fix locking bug / race introduced by previous patch: If we bail out of next_event() due to kill, there was a small window where we could exit without rli->data_lock held, causing an unlock-twice bug. --- sql/slave.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sql/slave.cc b/sql/slave.cc index bddb69d84bb..dab978be591 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -6181,6 +6181,17 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) DBUG_RETURN(ev); } + /* + 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 @@ -6241,17 +6252,6 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) rli->ignore_log_space_limit= true; } - /* - 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; - } - /* If the I/O thread is blocked, unblock it. Ok to broadcast after unlock, because the mutex is only destroyed in From 0bf95a0c5d81837709b589abd0ab44d1f4d4fc5f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Dec 2013 10:50:34 +0100 Subject: [PATCH 085/163] MDEV-5363: Make parallel replication waits killable Add another test case. Fix bug found: When one thread aborts, another thread might wrongly advance the relay log position too far, causing the fauling transaction to be skipped and thus lost upon restarting the SQL thread after the failure. --- mysql-test/suite/rpl/r/rpl_parallel.result | 96 +++++++++++++ mysql-test/suite/rpl/t/rpl_parallel.test | 150 +++++++++++++++++++++ sql/rpl_rli.cc | 6 +- 3 files changed, 249 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index d256a609b53..3ec6638e55f 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -327,6 +327,102 @@ a b 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='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,1963] +SELECT * FROM t3 WHERE a >= 40 ORDER BY a; +a b +41 41 +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; diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index 8a6eddbc2e5..73dab48c20a 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel.test @@ -452,6 +452,156 @@ INSERT INTO t3 VALUES (39,0); --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; + +--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,1963 +--source include/wait_for_slave_sql_error.inc +SELECT * FROM t3 WHERE a >= 40 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 (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 diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index d4db81b79c1..cfa7c0f344f 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -886,11 +886,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 From 245ab473a7b2e8aa70ee34562804f33080a6ba41 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Dec 2013 13:24:51 +0100 Subject: [PATCH 086/163] MDEV-5363: Make parallel replication waits killable Add another test case. --- mysql-test/suite/rpl/r/rpl_parallel.result | 87 +++++++++++++ mysql-test/suite/rpl/t/rpl_parallel.test | 141 +++++++++++++++++++++ 2 files changed, 228 insertions(+) diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index 3ec6638e55f..9dc03789714 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -428,6 +428,93 @@ 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='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,1963] +SELECT * FROM t3 WHERE a >= 50 ORDER BY a; +a b +51 51 +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=10; +include/start_slave.inc include/stop_slave.inc SET GLOBAL slave_parallel_threads=@old_parallel_threads; include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index 73dab48c20a..a1eb47f34f8 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel.test @@ -604,6 +604,147 @@ CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) 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; + +--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,1963 +--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 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 --source include/stop_slave.inc SET GLOBAL binlog_format=@old_format; From 50808b30d26b02837dbd7d0a9c9efbc89f2ff6eb Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 17 Dec 2013 17:26:54 +0100 Subject: [PATCH 087/163] MDEV-5396 Assertion `Handlerton: r==0 ' failed (errno=0) on EXPLAIN with TokuDB tables Fix EXPLAIN and CREATE SELECT to join_free() (and, thus, ha_index_end()) before ha_commit_trans(). --- sql/sql_parse.cc | 2 +- sql/sql_select.cc | 10 +++++----- .../tokudb_mariadb/r/commit_5396.result | 16 ++++++++++++++++ .../tokudb_mariadb/t/commit_5396.test | 18 ++++++++++++++++++ 4 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 storage/tokudb/mysql-test/tokudb_mariadb/r/commit_5396.result create mode 100644 storage/tokudb/mysql-test/tokudb_mariadb/t/commit_5396.test diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 41b809774ad..8ebdd3861e7 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4543,6 +4543,7 @@ finish: DBUG_ASSERT(!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()); + lex->unit.cleanup(); if (! thd->in_sub_stmt) { @@ -4575,7 +4576,6 @@ finish: #endif } - lex->unit.cleanup(); /* Free tables */ thd_proc_info(thd, "closing tables"); close_thread_tables(thd); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index cd475b28783..a224bd77bce 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2258,6 +2258,7 @@ JOIN::exec() 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()) && @@ -2268,16 +2269,15 @@ JOIN::exec() 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->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 */ 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/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; + From 1df23d6f0fc74bbc96d78821d19863f32355a35f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 25 Dec 2013 10:13:15 +0100 Subject: [PATCH 088/163] mtr: print a detailed warning on a uninit assignment in the [ENV] group spider suites: #varname is a valid syntax for a variable name, don't use it for comments --- mysql-test/mysql-test-run.pl | 15 +++-- storage/spider/mysql-test/spider/bg/my.cnf | 56 +++++++++---------- .../spider/mysql-test/spider/handler/my.cnf | 56 +++++++++---------- storage/spider/mysql-test/spider/my.cnf | 56 +++++++++---------- .../spider/mysql-test/spider/oracle/my.cnf | 56 +++++++++---------- .../spider/mysql-test/spider/oracle2/my.cnf | 56 +++++++++---------- 6 files changed, 151 insertions(+), 144 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b00ddd5f2fc..5a5f2655fda 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4265,11 +4265,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; + } } } 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/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 From ad5ddaff120a26f69abb07f762baa04fcfa74f31 Mon Sep 17 00:00:00 2001 From: Vicentiu Ciorbaru Date: Wed, 18 Dec 2013 15:39:09 +0200 Subject: [PATCH 089/163] Fix for: MDEV-5221: User auto-creation does not work upon GRANT --- .../roles/grant_role_auto_create_user.result | 64 ++++++++++ .../roles/grant_role_auto_create_user.test | 119 ++++++++++++++++++ sql/sql_acl.cc | 40 +++++- 3 files changed, 217 insertions(+), 6 deletions(-) create mode 100644 mysql-test/suite/roles/grant_role_auto_create_user.result create mode 100644 mysql-test/suite/roles/grant_role_auto_create_user.test 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..f60d1f80a3b --- /dev/null +++ b/mysql-test/suite/roles/grant_role_auto_create_user.result @@ -0,0 +1,64 @@ +create database db; +create role auto_create; +grant all on db.* to auto_create; +drop user foo@localhost, bar@localhost; +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..7275a0eb195 --- /dev/null +++ b/mysql-test/suite/roles/grant_role_auto_create_user.test @@ -0,0 +1,119 @@ +create database db; +create role auto_create; +grant all on db.* to auto_create; + +--error 0,ER_CANNOT_USER +drop user foo@localhost, bar@localhost; + +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/sql/sql_acl.cc b/sql/sql_acl.cc index ae724ae4672..460e600da13 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -5844,6 +5844,7 @@ bool mysql_grant_role(THD *thd, List &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; @@ -5859,12 +5860,18 @@ bool mysql_grant_role(THD *thd, List &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= test(thd->variables.sql_mode & MODE_NO_AUTO_CREATE_USER); - if (open_and_lock_tables(thd, &tables, FALSE, MYSQL_LOCK_IGNORE_TIMEOUT)) + 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)) DBUG_RETURN(TRUE); /* purecov: deadcode */ mysql_rwlock_wrlock(&LOCK_grant); @@ -5952,6 +5959,27 @@ bool mysql_grant_role(THD *thd, List &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); @@ -6004,7 +6032,7 @@ bool mysql_grant_role(THD *thd, List &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)) From 57400ee6819e7dbb601b19f0ac223c491ef7359f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Dec 2013 15:59:51 +0200 Subject: [PATCH 090/163] MDEV-5414: RAND() in a subselect : different behavior in MariaDB and MySQL Materialization forced in case if rand() used in view or derived table to avoud several calls of rand for gting value of a field. Fixed set variable uncachable flag from - it shouldbe a side effect not a random value. --- mysql-test/r/derived_view.result | 109 ++++++++++++++++++++++++++++++ mysql-test/r/view.result | 10 +++ mysql-test/t/derived_view.test | 112 +++++++++++++++++++++++++++++++ mysql-test/t/view.test | 16 +++++ sql/sql_derived.cc | 8 +++ sql/sql_lex.cc | 4 +- sql/sql_lex.h | 1 + sql/sql_yacc.yy | 4 +- 8 files changed, 261 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result index cd582f8ae9b..a37f9480e5c 100644 --- a/mysql-test/r/derived_view.result +++ b/mysql-test/r/derived_view.result @@ -2246,6 +2246,115 @@ Warnings: Note 1003 select 4 AS `a` from `test`.`t1` where (4 > 100) 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 table 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 table 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 SIMPLE ALL NULL NULL NULL NULL 2 Using filesort +1 SIMPLE 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/view.result b/mysql-test/r/view.result index c98d8dfd8a4..436b81a20a2 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -4740,6 +4740,16 @@ 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; # ----------------------------------------------------------------- # -- End of 5.3 tests. # ----------------------------------------------------------------- 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/view.test b/mysql-test/t/view.test index 2027f22e7c5..319f93664e7 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -4675,6 +4675,22 @@ 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 # -- End of 5.3 tests. --echo # ----------------------------------------------------------------- diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 9d04beaf73e..5227ec2d958 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -357,6 +357,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; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 8ba3c671598..ccc51e39785 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -2340,7 +2340,9 @@ bool st_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(); diff --git a/sql/sql_lex.h b/sql/sql_lex.h index d5639724d5f..72e8bf87440 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -2002,6 +2002,7 @@ typedef struct st_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_yacc.yy b/sql/sql_yacc.yy index b1772536639..1b5b975ccd4 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -8772,7 +8772,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 @@ -8781,7 +8781,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 { From 86a2c03b51b2995a0f35ae448e3bf953b90060ad Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Dec 2013 16:26:22 +0100 Subject: [PATCH 091/163] MDEV-5363: Make parallel replication waits killable Add another test case. This one for killing a worker while its transaction is waiting to start until the previous transaction has committed. Fix setting reading_or_writing to 0 in worker threads so SHOW SLAVE STATUS can show something more useful than "Reading from net". --- mysql-test/suite/rpl/r/rpl_parallel.result | 115 ++++++++++++ mysql-test/suite/rpl/t/rpl_parallel.test | 196 +++++++++++++++++++++ sql/rpl_parallel.cc | 9 + 3 files changed, 320 insertions(+) diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index 9dc03789714..ef88ecfef44 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -295,6 +295,7 @@ a b 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'; @@ -513,6 +514,120 @@ 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=3; +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; +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')); +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 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 binlog_format=statement; +INSERT INTO t3 VALUES (64, foo(64, +'commit_before_prepare_ordered 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 +SET debug_sync='now SIGNAL d0_cont'; +SET debug_sync='now WAIT_FOR t1_waiting'; +SET debug_sync='now SIGNAL d1_cont'; +SET debug_sync='now WAIT_FOR t3_waiting'; +SET debug_sync='now SIGNAL d2_cont'; +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,1963] +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 60 ORDER BY a; +a b +60 60 +61 61 +62 62 +63 63 +64 64 +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 (69,0); +include/start_slave.inc +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 +69 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 include/stop_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index a1eb47f34f8..94d3b53974a 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel.test @@ -402,6 +402,7 @@ SELECT * FROM t3 WHERE a >= 30 ORDER BY a; 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. @@ -745,6 +746,201 @@ 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=3; +--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 three worker threads. T1 and T2 will be queued on the first, T3 on +# the second, and T4 on the third. We will delay T1 commit, T3 will wait for +# T1 to 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 three dummy transactions in a debug_sync-controlled +# manner to be able to get known thread ids for the workers in a pool with +# just 3 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; +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')); +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%'` + +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'; + +# 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, + 'commit_before_prepare_ordered 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; + +--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'; + +# T2 will be queued on the same worker D0 as T1. +# 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. T4 may or may not have time to be queued on it, but +# it will not be able to complete due to T3 being killed. +SET debug_sync='now SIGNAL d2_cont'; + +# 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,1963 +--source include/wait_for_slave_sql_error.inc +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 60 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 (69,0); +--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 --source include/stop_slave.inc SET GLOBAL binlog_format=@old_format; diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 91aa36abc52..3cdd1f5ec8d 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" /* @@ -219,6 +220,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; @@ -308,6 +310,7 @@ handle_rpl_parallel_thread(void *arg) "Waiting for prior transaction to commit " "before starting next transaction"); did_enter_cond= true; + DEBUG_SYNC(thd, "rpl_parallel_start_waiting_for_prior"); while (wait_start_sub_id > entry->last_committed_sub_id && !thd->check_killed()) mysql_cond_wait(&entry->COND_parallel_entry, @@ -315,6 +318,7 @@ handle_rpl_parallel_thread(void *arg) if (wait_start_sub_id > entry->last_committed_sub_id) { /* The thread got a kill signal. */ + 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); @@ -383,6 +387,7 @@ handle_rpl_parallel_thread(void *arg) &rgi->commit_orderer); delete rgi; group_rgi= rgi= NULL; + DEBUG_SYNC(thd, "rpl_parallel_end_of_group"); } events= next; @@ -843,6 +848,10 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, 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. + + In addition, we must not start executing this event until we have + finished the previous collection of event groups that group-committed + together; we use rgi->wait_start_sub_id to control this. */ rpl_parallel_thread *rpt= global_rpl_thread_pool.get_thread(e); rgi->wait_commit_sub_id= e->current_sub_id; From 1555f1801d330d07bdaa94f106dbd407a68f3c90 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Dec 2013 12:35:47 +0200 Subject: [PATCH 092/163] make 5.1 compiling with modern gcc. --- mysys/md5.c | 2 +- sql/field.cc | 4 ++-- storage/maria/ma_blockrec.c | 2 +- storage/maria/ma_checksum.c | 2 +- storage/maria/ma_key.c | 2 +- storage/myisam/mi_checksum.c | 2 +- storage/myisam/mi_key.c | 2 +- storage/pbxt/src/myxt_xt.cc | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mysys/md5.c b/mysys/md5.c index 2388cebedc4..22a5e409a09 100644 --- a/mysys/md5.c +++ b/mysys/md5.c @@ -176,7 +176,7 @@ my_MD5Final (unsigned char digest[16], my_MD5Context *ctx) putu32(ctx->buf[1], digest + 4); putu32(ctx->buf[2], digest + 8); putu32(ctx->buf[3], digest + 12); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } #ifndef ASM_MD5 diff --git a/sql/field.cc b/sql/field.cc index 7e2db40ccb0..5b864bb7ba0 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -7709,7 +7709,7 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs) if (!String::needs_conversion(length, cs, field_charset, &dummy_offset)) { Field_blob::store_length(length); - bmove(ptr+packlength,(char*) &from,sizeof(char*)); + bmove(ptr + packlength, &from, sizeof(char*)); return 0; } if (tmpstr.copy(from, length, cs)) @@ -8364,7 +8364,7 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs) value.copy(from, length, cs); from= value.ptr(); } - bmove(ptr + packlength, (char*) &from, sizeof(char*)); + bmove(ptr + packlength, &from, sizeof(char*)); } return 0; diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index 73b3326fd28..a08cd554615 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -7154,7 +7154,7 @@ my_bool _ma_apply_undo_row_delete(MARIA_HA *info, LSN undo_lsn, memcpy(field_pos, field_length_data, size_length); field_length_data+= size_length; - memcpy(field_pos + size_length, &header, sizeof(&header)); + memcpy(field_pos + size_length, &header, sizeof(header)); header+= blob_length; *blob_lengths++= blob_length; break; diff --git a/storage/maria/ma_checksum.c b/storage/maria/ma_checksum.c index 61ec638053a..da2d40d3687 100644 --- a/storage/maria/ma_checksum.c +++ b/storage/maria/ma_checksum.c @@ -58,7 +58,7 @@ ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record) length= _ma_calc_blob_length(blob_size_length, pos); if (length) { - memcpy((char*) &pos, pos + blob_size_length, sizeof(char*)); + memcpy(&pos, pos + blob_size_length, sizeof(char*)); crc= my_checksum(crc, pos, length); } continue; diff --git a/storage/maria/ma_key.c b/storage/maria/ma_key.c index 207ae9a8bda..037e8db2cfb 100644 --- a/storage/maria/ma_key.c +++ b/storage/maria/ma_key.c @@ -583,7 +583,7 @@ static int _ma_put_key_in_record(register MARIA_HA *info, uint keynr, goto err; #endif memcpy(record+keyseg->start+keyseg->bit_start, - (char*) &blob_ptr,sizeof(char*)); + &blob_ptr,sizeof(char*)); memcpy(blob_ptr,key,length); blob_ptr+=length; diff --git a/storage/myisam/mi_checksum.c b/storage/myisam/mi_checksum.c index 8c408ef7ff5..13dd52db22e 100644 --- a/storage/myisam/mi_checksum.c +++ b/storage/myisam/mi_checksum.c @@ -40,7 +40,7 @@ ha_checksum mi_checksum(MI_INFO *info, const uchar *buf) length=_mi_calc_blob_length(column->length- portable_sizeof_char_ptr, buf); - memcpy((char*) &pos, buf+column->length- portable_sizeof_char_ptr, + memcpy(&pos, buf+column->length- portable_sizeof_char_ptr, sizeof(char*)); break; } diff --git a/storage/myisam/mi_key.c b/storage/myisam/mi_key.c index 94f3f34ec58..02254bae68d 100644 --- a/storage/myisam/mi_key.c +++ b/storage/myisam/mi_key.c @@ -419,7 +419,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr, goto err; #endif memcpy(record+keyseg->start+keyseg->bit_start, - (char*) &blob_ptr,sizeof(char*)); + &blob_ptr,sizeof(char*)); memcpy(blob_ptr,key,length); blob_ptr+=length; diff --git a/storage/pbxt/src/myxt_xt.cc b/storage/pbxt/src/myxt_xt.cc index b7b81823383..49a22e980ca 100644 --- a/storage/pbxt/src/myxt_xt.cc +++ b/storage/pbxt/src/myxt_xt.cc @@ -937,7 +937,7 @@ xtPublic xtBool myxt_create_row_from_key(XTOpenTablePtr XT_UNUSED(ot), XTIndexPt */ byte *key_ptr = key; // Cannot take the address of a register variable! memcpy(record+keyseg->start+keyseg->bit_start, - (char*) &key_ptr,sizeof(char*)); + &key_ptr,sizeof(char*)); my_store_blob_length(record+keyseg->start, (uint) keyseg->bit_start,length); From 5f2b07efc7bb146f9729f55fb954e0a3bfc5ef02 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 25 Dec 2013 21:21:47 +0100 Subject: [PATCH 093/163] minor cleanup --- mysql-test/suite/roles/grant_role_auto_create_user.result | 1 - mysql-test/suite/roles/grant_role_auto_create_user.test | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/roles/grant_role_auto_create_user.result b/mysql-test/suite/roles/grant_role_auto_create_user.result index f60d1f80a3b..81b25e5f527 100644 --- a/mysql-test/suite/roles/grant_role_auto_create_user.result +++ b/mysql-test/suite/roles/grant_role_auto_create_user.result @@ -1,7 +1,6 @@ create database db; create role auto_create; grant all on db.* to auto_create; -drop user foo@localhost, bar@localhost; grant auto_create to foo@localhost; grant auto_create to bar@localhost identified by 'baz'; set role 'auto_create'; diff --git a/mysql-test/suite/roles/grant_role_auto_create_user.test b/mysql-test/suite/roles/grant_role_auto_create_user.test index 7275a0eb195..d2489a4ea74 100644 --- a/mysql-test/suite/roles/grant_role_auto_create_user.test +++ b/mysql-test/suite/roles/grant_role_auto_create_user.test @@ -1,10 +1,12 @@ +# +# MDEV-5221 User auto-creation does not work upon GRANT +# +--source include/not_embedded.inc + create database db; create role auto_create; grant all on db.* to auto_create; ---error 0,ER_CANNOT_USER -drop user foo@localhost, bar@localhost; - grant auto_create to foo@localhost; grant auto_create to bar@localhost identified by 'baz'; From f8c7e3477f17488f546ab5d20c4fad6aa0577d01 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Mon, 30 Dec 2013 20:30:29 +0400 Subject: [PATCH 094/163] MDEV-5349: Test main.subselect_sj_jcl6 fails sporadically due to insufficient ordering - Add --sorted_result to the query --- mysql-test/r/subselect_sj.result | 4 ++-- mysql-test/r/subselect_sj_jcl6.result | 4 ++-- mysql-test/t/subselect_sj.test | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result index 0e9d8240843..0e028cc7f51 100644 --- a/mysql-test/r/subselect_sj.result +++ b/mysql-test/r/subselect_sj.result @@ -2931,10 +2931,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_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result index 4b503dc8bbb..af91cc3eeac 100644 --- a/mysql-test/r/subselect_sj_jcl6.result +++ b/mysql-test/r/subselect_sj_jcl6.result @@ -2945,10 +2945,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/t/subselect_sj.test b/mysql-test/t/subselect_sj.test index 536606175bb..a6ce3f25617 100644 --- a/mysql-test/t/subselect_sj.test +++ b/mysql-test/t/subselect_sj.test @@ -2634,6 +2634,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: From c050b5fdf9564e5ffd98ff381c61504efdf69f99 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 2 Jan 2014 15:51:02 +0200 Subject: [PATCH 095/163] Fixed MDEV-5424: SELECT using ORDER BY DESC and LIMIT produces unexpected results (InnoDB/XtraDB) This only happend when using an ORDER BY on a primary key part, where all other key parts where constant. Remove of duplicated expressions in ORDER BY (as the old code did this in some strange cases) mysql-test/r/group_by.result: Fixed results to take into account that duplicate order by parts are now deleted mysql-test/r/group_by_innodb.result: Ensure extended keys are on mysql-test/r/innodb_ext_key.result: More tests mysql-test/r/order_by.result: More tests mysql-test/t/group_by.test: Fixed results to take into account that duplicate order by parts are now deleted mysql-test/t/group_by_innodb.test: Ensure extended keys are on mysql-test/t/innodb_ext_key.test: More tests mysql-test/t/order_by.test: More tests sql/sql_select.cc: Fixed bug where we looked at extended key parts when we shouldn't Remove of duplicated expressions in ORDER BY sql/table.cc: Indentation fixes --- mysql-test/r/group_by.result | 22 +++++++------ mysql-test/r/group_by_innodb.result | 7 +++-- mysql-test/r/innodb_ext_key.result | 48 +++++++++++++++++++++++++++++ mysql-test/r/order_by.result | 6 ++++ mysql-test/t/group_by.test | 14 +++++---- mysql-test/t/group_by_innodb.test | 6 ++++ mysql-test/t/innodb_ext_key.test | 28 +++++++++++++++++ mysql-test/t/order_by.test | 3 ++ sql/sql_select.cc | 35 +++++++++++++++------ sql/table.cc | 17 +++++----- 10 files changed, 149 insertions(+), 37 deletions(-) diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 9bb22eb8169..553607dc03f 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 range NULL idx 5 NULL 7 Using index for group-by; Using temporary; Using filesort +1 SIMPLE t1 range NULL idx 5 NULL 7 Using index for group-by 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 diff --git a/mysql-test/r/group_by_innodb.result b/mysql-test/r/group_by_innodb.result index d165834cbe3..86d431b00d2 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,10 @@ 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; End of 5.5 tests +set optimizer_switch=@save_ext_key_optimizer_switch; diff --git a/mysql-test/r/innodb_ext_key.result b/mysql-test/r/innodb_ext_key.result index 4a6b902e869..df681f21f3b 100644 --- a/mysql-test/r/innodb_ext_key.result +++ b/mysql-test/r/innodb_ext_key.result @@ -987,6 +987,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/order_by.result b/mysql-test/r/order_by.result index e37d64d6d44..0487f9222e0 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 diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 1ef514d591d..e4120f284de 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1336,7 +1336,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 +1366,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 +1388,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; diff --git a/mysql-test/t/group_by_innodb.test b/mysql-test/t/group_by_innodb.test index 0d5e5e9ae30..9733610dde1 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 @@ -36,3 +40,5 @@ WHERE a = 'r' OR pk = 183 GROUP BY field1, field1; drop table t1; --echo End of 5.5 tests + +set optimizer_switch=@save_ext_key_optimizer_switch; diff --git a/mysql-test/t/innodb_ext_key.test b/mysql-test/t/innodb_ext_key.test index 36414105917..6d1890ac1f9 100644 --- a/mysql-test/t/innodb_ext_key.test +++ b/mysql-test/t/innodb_ext_key.test @@ -662,6 +662,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/order_by.test b/mysql-test/t/order_by.test index 3e20d22d726..35f1a7f744b 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 diff --git a/sql/sql_select.cc b/sql/sql_select.cc index a224bd77bce..08da695a12f 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -11038,6 +11038,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. @@ -11045,9 +11047,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 @@ -11060,7 +11063,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; @@ -11074,7 +11077,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 @@ -11143,6 +11145,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; @@ -18829,7 +18842,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, 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) @@ -18853,20 +18866,22 @@ 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. */ - if (key_part == start+table->key_info[table->s->primary_key].key_parts && + if (key_part == + start+table->key_info[table->s->primary_key].key_parts && reverse == 0) { key_parts= 0; - reverse= 1; + reverse= 1; // Key is ok to use goto ok; } } diff --git a/sql/table.cc b/sql/table.cc index c949112e7ee..b0be0791cd6 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -734,14 +734,10 @@ err_not_open: } -static bool create_key_infos(uchar *strpos, uint keys, KEY *keyinfo, uint new_frm_ver, +static bool create_key_infos(uchar *strpos, uint keys, KEY *keyinfo, + uint new_frm_ver, uint &ext_key_parts, TABLE_SHARE *share, uint len, - KEY *first_keyinfo, char* &keynames - - - - - ) + KEY *first_keyinfo, char* &keynames) { uint i, j, n_length; KEY_PART_INFO *key_part= NULL; @@ -848,7 +844,6 @@ static bool create_key_infos(uchar *strpos, uint keys, KEY *keyinfo, uint new_fr keyinfo->ext_key_part_map= 0; if (share->use_ext_keys && i) { - keyinfo->ext_key_part_map= 0; for (j= 0; j < first_key_parts && keyinfo->ext_key_parts < MAX_REF_PARTS; j++) @@ -1148,7 +1143,8 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, share->set_use_ext_keys_flag(share->db_type()->flags & HTON_EXTENDED_KEYS); - if (create_key_infos(disk_buff + 6, keys, keyinfo, new_frm_ver, ext_key_parts, + if (create_key_infos(disk_buff + 6, keys, keyinfo, new_frm_ver, + ext_key_parts, share, len, &first_keyinfo, keynames)) goto err; @@ -1242,7 +1238,8 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, } else { - if (create_key_infos(disk_buff + 6, keys, keyinfo, new_frm_ver, ext_key_parts, + if (create_key_infos(disk_buff + 6, keys, keyinfo, new_frm_ver, + ext_key_parts, share, len, &first_keyinfo, keynames)) goto err; } From c4e76b20a4da6f060b77b22b12c67b4b1f2b512c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Jan 2014 12:20:53 +0100 Subject: [PATCH 096/163] MDEV-5363: Make parallel replication waits killable Add another test case. This one for killing the SQL driver thread while it is waiting for room in the list of events queued for a worker thread. Fix bugs found: - Several memory leaks in various error cases. - SQL error code was not set (for SHOW SLAVE STATUS etc.) when killed. --- mysql-test/suite/rpl/r/rpl_parallel.result | 40 +++++++++++++ mysql-test/suite/rpl/t/rpl_parallel.test | 69 ++++++++++++++++++++++ sql/rpl_parallel.cc | 17 ++++++ 3 files changed, 126 insertions(+) diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index ef88ecfef44..7a9fd69b2fb 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -630,6 +630,46 @@ 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 (70, 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"; +INSERT INTO t3 VALUES (72, 0); +SELECT * FROM t3 WHERE a >= 70 ORDER BY a; +a b +70 0 +71 10000 +72 0 +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,1963] +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 70 ORDER BY a; +a b +70 0 +71 10000 +SET GLOBAL debug_dbug=@old_dbug; +SET GLOBAL slave_parallel_max_queued= @old_max_queued; +INSERT INTO t3 VALUES (73,0); +include/start_slave.inc +SELECT * FROM t3 WHERE a >= 70 ORDER BY a; +a b +70 0 +71 10000 +72 0 +73 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 include/stop_slave.inc SET GLOBAL slave_parallel_threads=@old_parallel_threads; include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index 94d3b53974a..a0232ac71e0 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel.test @@ -940,6 +940,75 @@ CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500)) --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 *** + +--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 (70, foo(0, + 'ha_write_row_end SIGNAL query_waiting WAIT_FOR query_cont', '')); +--disable_query_log +# Create an event that will fill up the queue. +eval INSERT INTO t3 VALUES (71, LENGTH('$bigstring')); +--enable_query_log + +--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 +# This event will have to wait for the queue to become shorter before it can +# be queued. We will test that things work when we kill the SQL driver thread +# during this wait. +INSERT INTO t3 VALUES (72, 0); +SELECT * FROM t3 WHERE a >= 70 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,1963 +--source include/wait_for_slave_sql_error.inc +STOP SLAVE IO_THREAD; +SELECT * FROM t3 WHERE a >= 70 ORDER BY a; + +SET GLOBAL debug_dbug=@old_dbug; +SET GLOBAL slave_parallel_max_queued= @old_max_queued; + +--connection server_1 +INSERT INTO t3 VALUES (73,0); +--save_master_pos + +--connection server_2 +--source include/start_slave.inc +--sync_with_master +SELECT * FROM t3 WHERE a >= 70 ORDER BY a; + --connection server_2 --source include/stop_slave.inc diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 3cdd1f5ec8d..af44d79038c 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -801,6 +801,7 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, sql_thread_stopping= true; if (sql_thread_stopping) { + delete ev; /* QQ: Need a better comment why we return false here */ return false; } @@ -809,6 +810,7 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, MYF(0)))) { my_error(ER_OUT_OF_RESOURCES, MYF(0)); + delete ev; return true; } qev->ev= ev; @@ -831,6 +833,8 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, { my_error(ER_OUT_OF_RESOURCES, MYF(MY_WME)); delete rgi; + my_free(qev); + delete ev; return true; } rgi->is_parallel_exec = true; @@ -903,6 +907,14 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, mysql_mutex_unlock(&cur_thread->LOCK_rpl_thread); my_error(ER_CONNECTION_KILLED, MYF(0)); delete rgi; + my_free(qev); + delete ev; + 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 true; } else @@ -918,6 +930,11 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, (&cur_thread->COND_rpl_thread, &cur_thread->LOCK_rpl_thread, "Waiting for room in worker thread event queue"); did_enter_cond= true; + DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max", + { + debug_sync_set_action(rli->sql_driver_thd, + STRING_WITH_LEN("now SIGNAL wait_queue_ready")); + };); } mysql_cond_wait(&cur_thread->COND_rpl_thread, &cur_thread->LOCK_rpl_thread); From 4e9a2d5469cd3baebcd3cce33db9b39d6ec9b67c Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sun, 5 Jan 2014 15:21:58 +0200 Subject: [PATCH 097/163] Don't writing entries to slave log about binlog_checksum not existing on master if log_warnings is <=1. This solves the issue of getting a lot of unnecessary errors logged on the slave when connecting to MySQL or an old MariaDB version. sql/slave.cc: Don't write that binlog_checksum doesn't exists on the master if log_warnings <= 1 --- sql/slave.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sql/slave.cc b/sql/slave.cc index afaca619a69..3c17f102a7f 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1670,10 +1670,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 { From cee925185186b02ec89bf988918fe958053da139 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Jan 2014 16:05:52 +0100 Subject: [PATCH 098/163] MDEV-5363: Make parallel replication waits killable Add another test case. This one for killing a query that is waiting for a prior commit, when --log-slave-updates=0 (in this case the wait happens in different code from --log-slave-updates=1). --- .../rpl_parallel_no_log_slave_updates.result | 122 +++++++++++ ...pl_parallel_no_log_slave_updates-slave.opt | 1 + .../t/rpl_parallel_no_log_slave_updates.test | 199 ++++++++++++++++++ sql/handler.cc | 10 +- sql/sql_class.cc | 2 + 5 files changed, 332 insertions(+), 2 deletions(-) create mode 100644 mysql-test/suite/rpl/r/rpl_parallel_no_log_slave_updates.result create mode 100644 mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test 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..067d92a962f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_parallel_no_log_slave_updates.result @@ -0,0 +1,122 @@ +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; +include/start_slave.inc +DROP function foo; +DROP TABLE t3; +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..98f919e4727 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_parallel_no_log_slave_updates.test @@ -0,0 +1,199 @@ +--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; +--source include/start_slave.inc + +--connection server_1 +DROP function foo; +DROP TABLE t3; + +--source include/rpl_end.inc diff --git a/sql/handler.cc b/sql/handler.cc index 88431d4db32..1c5d643ed96 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1471,8 +1471,12 @@ int ha_commit_one_phase(THD *thd, bool all) bool is_real_trans=all || thd->transaction.all.ha_list == 0; 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); } @@ -1484,6 +1488,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) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 11c03191a49..8abdd53469f 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -5789,6 +5789,7 @@ wait_for_commit::wait_for_prior_commit2(THD *thd) wait_for_commit *loc_waitee; mysql_mutex_lock(&LOCK_wait_commit); + DEBUG_SYNC(thd, "wait_for_prior_commit_waiting"); old_msg= thd->enter_cond(&COND_wait_commit, &LOCK_wait_commit, "Waiting for prior transaction to commit"); while (waiting_for_commit && !thd->check_killed()) @@ -5821,6 +5822,7 @@ wait_for_commit::wait_for_prior_commit2(THD *thd) remove_from_list(&loc_waitee->subsequent_commits_list); mysql_mutex_unlock(&loc_waitee->LOCK_wait_commit); + DEBUG_SYNC(thd, "wait_for_prior_commit_killed"); wakeup_error= thd->killed_errno(); if (!wakeup_error) wakeup_error= ER_QUERY_INTERRUPTED; From 3aa370bb693ba734131fc2d581da538b9d2a2aa7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Jan 2014 21:30:42 +0200 Subject: [PATCH 099/163] MDEV-5515: 2nd execution of a prepared statement returns wrong results update_used_tables() should be called after handling derived tables in any case. --- mysql-test/r/view.result | 40 ++++++++++++++++++++++++++++++++++++++++ mysql-test/t/view.test | 29 +++++++++++++++++++++++++++++ sql/sql_select.cc | 3 ++- 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 436b81a20a2..cec6adafdce 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -4750,6 +4750,46 @@ a r1 = r2 r2 = r3 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/t/view.test b/mysql-test/t/view.test index 319f93664e7..d3a7e098ad8 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -4691,6 +4691,35 @@ 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/sql/sql_select.cc b/sql/sql_select.cc index d38363f15d1..28c2b86ffdf 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -939,8 +939,9 @@ JOIN::optimize() 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(); if (transform_max_min_subquery()) DBUG_RETURN(1); /* purecov: inspected */ From 283af34a6d9ac9cdd378a67ccd22da8bcdc577ec Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 Jan 2014 19:09:01 +0100 Subject: [PATCH 100/163] MDEV-5543 MyISAM repair unsafe usage of TMD files --- mysql-test/r/repair_symlink-5543.result | 14 +++++++++++++ mysql-test/t/repair_symlink-5543.test | 26 +++++++++++++++++++++++++ storage/maria/ha_maria.cc | 3 ++- storage/myisam/ha_myisam.cc | 3 ++- 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 mysql-test/r/repair_symlink-5543.result create mode 100644 mysql-test/t/repair_symlink-5543.test 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/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/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index ce308887516..f1cb53a43cf 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 @@ -1467,7 +1468,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; - 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; diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 2be71dadf4b..aa56077469b 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1,5 +1,6 @@ /* Copyright (c) 2000, 2011, 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 @@ -1138,7 +1139,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; - 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; From c0065d153938eea2a7c2729e7e65d624affc040e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 Jan 2014 20:53:39 +0100 Subject: [PATCH 101/163] fix a warning --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index e4beae1c10b..60725b4448e 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -478,7 +478,7 @@ sub main { } } - if ( not defined @$completed ) { + if ( not @$completed ) { mtr_error("Test suite aborted"); } From 5e02635eb846214b462ed4ab45b2142a08dc5a91 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Tue, 21 Jan 2014 17:27:36 +0400 Subject: [PATCH 102/163] MDEV-4974: memory leak in 5.5.32-MariaDB-1~wheezy-log - When a JOIN has both "optimization tabs" (JOIN_TABs used to read the base tables and do the join operation) and also has "execution tabs" (a JOIN_TAB that is to produce result set that is sent to the client), do not forget to call JOIN_TAB::cleanup() for the execution JOIN_TAB. --- mysql-test/r/order_by.result | 24 ++++++++++++++++++++++++ mysql-test/t/order_by.test | 29 +++++++++++++++++++++++++++++ sql/sql_select.cc | 10 ++++++++++ 3 files changed, 63 insertions(+) diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 0487f9222e0..6ce12651dba 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -2026,4 +2026,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/t/order_by.test b/mysql-test/t/order_by.test index 35f1a7f744b..2ebf8ba5af1 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -1717,6 +1717,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/sql/sql_select.cc b/sql/sql_select.cc index d4cf72ede42..dfbf5e144e5 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -10819,6 +10819,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; From 04bee0af2e8d663fd06e5dc4ecdc2b64b30440ea Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 22 Jan 2014 15:16:57 +0200 Subject: [PATCH 103/163] Fix for MDEV-5547: Bad error message when moving very old .frm files to MariaDB 5.5. mysql_upgrade --help now also prints out --default options and variable values. mysql_upgrade now prints permission errors. mysql_upgrade doesn't print some non essential info if --silent is used. Added handler error message about incompatible versions Fixed that mysqlbug and mysql_install_db have the executable flag set. Removed executable flag for some non executable files. Changed in mysql_install_db askmonty.org to mariadb.com. Ensured that all client executables prints --default options the same way. Allow REPAIR ... USE_FRM for old .frm files if the are still compatible. Extended shown error for storage engine messages. client/mysql.cc: print_defaults() should be first (as in all other programs) client/mysql_upgrade.c: --help now also prints out --default options and variable values Print out error if wrong permissions Don't print info if --silent client/mysqladmin.cc: print_defaults() should be first (as in all other programs) client/mysqlbinlog.cc: Added print_defaults() to --help client/mysqlcheck.c: Added empty line in --help client/mysqlimport.c: Added empty line in --help client/mysqlshow.c: Made --help compatible client/mysqlslap.c: Made --help compatible client/mysqltest.cc: Added print_defaults() to --help include/handler_ername.h: Added handler error message include/my_base.h: Added handler error message mysql-test/r/mysql_upgrade.result: Updated results mysql-test/r/repair.result: Added test case for better error messages mysql-test/std_data/host_old.MYD: Added test case for better error messages mysql-test/std_data/host_old.MYI: Added test case for better error messages mysql-test/std_data/host_old.frm: Added test case for better error messages mysql-test/t/repair.test: Added test case for better error messages mysys/my_handler_errors.h: Added handler error message scripts/CMakeLists.txt: Fixed that mysqlbug and mysql_install_db have the executable flag set scripts/mysql_install_db.sh: askmonty.org -> mariadb.com sql/ha_partition.cc: Sometimes table_type() can be called for errors even if partition didn't manage to open any files sql/handler.cc: Write clear text for not handled, but defined error messages. sql/share/errmsg-utf8.txt: Extended shown error for storage engine messages sql/sql_admin.cc: Allow REPAIR ... USE_FRM for old .frm files if the are still compatible storage/myisam/ha_myisam.cc: Use new error message --- client/mysql.cc | 3 +- client/mysql_upgrade.c | 35 +++++++++++++++++------- client/mysqladmin.cc | 3 +- client/mysqlbinlog.cc | 2 ++ client/mysqlcheck.c | 1 + client/mysqldump.c | 3 +- client/mysqlimport.c | 3 +- client/mysqlshow.c | 1 + client/mysqlslap.c | 2 ++ client/mysqltest.cc | 3 +- include/handler_ername.h | 1 + include/my_base.h | 3 +- mysql-test/r/mysql_upgrade.result | 3 ++ mysql-test/r/repair.result | 34 +++++++++++++++++++---- mysql-test/std_data/host_old.MYD | 0 mysql-test/std_data/host_old.MYI | Bin 0 -> 1024 bytes mysql-test/std_data/host_old.frm | Bin 0 -> 8958 bytes mysql-test/t/mysql_upgrade.test | 5 ++++ mysql-test/t/repair.test | 20 ++++++++++++++ mysys/my_handler_errors.h | 3 +- scripts/CMakeLists.txt | 8 ++++++ scripts/mysql_install_db.sh | 8 +++--- scripts/mysql_secure_installation.pl.in | 0 scripts/mytop.sh | 0 sql/ha_partition.cc | 2 +- sql/handler.cc | 13 ++++++++- sql/share/errmsg-utf8.txt | 20 +++++++------- sql/sql_admin.cc | 5 ++-- storage/myisam/ha_myisam.cc | 2 +- 29 files changed, 142 insertions(+), 41 deletions(-) create mode 100644 mysql-test/std_data/host_old.MYD create mode 100644 mysql-test/std_data/host_old.MYI create mode 100644 mysql-test/std_data/host_old.frm mode change 100755 => 100644 scripts/mysql_secure_installation.pl.in mode change 100755 => 100644 scripts/mytop.sh diff --git a/client/mysql.cc b/client/mysql.cc index a37392c7fc5..c2bfdce2f74 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1672,8 +1672,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_upgrade.c b/client/mysql_upgrade.c index 9e39b7273ea..8529ab91015 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -22,7 +22,7 @@ #include /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ -#define VER "1.3" +#define VER "1.3a" #ifdef HAVE_SYS_WAIT_H #include @@ -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); } @@ -855,14 +870,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. */ @@ -895,6 +907,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 */ } @@ -963,7 +977,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 e4a45d52f83..dd35547a2c2 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -1179,9 +1179,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 408a7c36139..990fadadae2 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1542,6 +1542,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 7462c7561f6..b9053c3a142 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; diff --git a/client/mysqldump.c b/client/mysqldump.c index bf3697f2b84..88aae2d4321 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -612,7 +612,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 */ diff --git a/client/mysqlimport.c b/client/mysqlimport.c index 77d0cd0a7d3..686f26cebeb 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 323c4282ff4..5bcdd911cfd 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -279,6 +279,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 202fcf7950f..536535be294 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -732,7 +732,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 22645c89067..68d220b26c0 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -7003,8 +7003,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); } 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/my_base.h b/include/my_base.h index e072bb7e2b1..36c97d61cb9 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -466,7 +466,8 @@ enum ha_base_keytype { #define HA_ERR_ROW_NOT_VISIBLE 182 #define HA_ERR_ABORTED_BY_USER 183 #define HA_ERR_DISK_FULL 184 -#define HA_ERR_LAST 184 /* Copy of last error nr */ +#define HA_ERR_INCOMPATIBLE_DEFINITION 185 +#define HA_ERR_LAST 185 /* Copy of last error nr */ /* Number of different errors */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index 7c745d83e5d..285b00ae27f 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -108,6 +108,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/repair.result b/mysql-test/r/repair.result index 1a98f2f0f36..52ae9c38792 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 185 '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' from MyISAM +check table t1; +Table Op Msg_type Msg_text +test.t1 check Error Got error 185 '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' from MyISAM +test.t1 check error Corrupt +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair Error Got error 185 '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' from 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/std_data/host_old.MYD b/mysql-test/std_data/host_old.MYD new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mysql-test/std_data/host_old.MYI b/mysql-test/std_data/host_old.MYI new file mode 100644 index 0000000000000000000000000000000000000000..c4c3f225e25d295aaf3167ee1ede643651a0a90e GIT binary patch literal 1024 zcmezOkDZZ$iE%r_28I-d6AVlY42%pMj0`}a@E=5C1OK4_BFBPF2@WxjLZAdp10&2F z7!A`DbiY9y$_Bf{rt;bem>h^kl7|U{)gg?A3FD;OfilQg1jy$Fsb*n@7zK1>2Z)ah zfPupg6mMW)V`yUH0Lw5l*Z^s;7N`g#g9A{+7Ay;uVE`)vihyK*0P0u@DTrC4YKm&1 # # Bug #26639 mysql_upgrade exits successfully even if external command failed diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test index 3c55f06ff4c..337b73f37d1 100644 --- a/mysql-test/t/repair.test +++ b/mysql-test/t/repair.test @@ -188,3 +188,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_ERRMSG +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/mysys/my_handler_errors.h b/mysys/my_handler_errors.h index 8b3b359ea95..bcc1ba9c476 100644 --- a/mysys/my_handler_errors.h +++ b/mysys/my_handler_errors.h @@ -86,7 +86,8 @@ static const char *handler_error_messages[]= "Table is being used in foreign key check", "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/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 76e92899c2a..cd4cfc858d8 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -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} diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index a481aa836c6..10038d2cf58 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -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() @@ -492,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 @@ -512,9 +512,9 @@ then 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 old mode 100755 new mode 100644 diff --git a/scripts/mytop.sh b/scripts/mytop.sh old mode 100755 new mode 100644 diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index f65ab41908d..feda3460c9f 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -305,7 +305,7 @@ void ha_partition::init_handler_variables() const char *ha_partition::table_type() const { // we can do this since we only support a single engine type - return m_file[0]->table_type(); + return m_file && m_file[0] ? m_file[0]->table_type() : "Unknown"; } diff --git a/sql/handler.cc b/sql/handler.cc index 59ed31f6076..e6981689d19 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -44,6 +44,7 @@ #include "probes_mysql.h" #include "debug_sync.h" // DEBUG_SYNC #include "sql_audit.h" +#include "../mysys/my_handler_errors.h" #ifdef WITH_PARTITION_STORAGE_ENGINE #include "ha_partition.h" @@ -3139,8 +3140,18 @@ void handler::print_error(int error, myf errflag) my_error(ER_GET_ERRMSG, errflag, error, str.c_ptr(), engine); } } + else if (error >= HA_ERR_FIRST && error <= HA_ERR_LAST) + { + const char* engine= table_type(); + const char *errmsg= handler_error_messages[error - HA_ERR_FIRST]; + my_error(ER_GET_ERRMSG, errflag, error, errmsg, engine); + SET_FATAL_ERROR; + } else - my_error(ER_GET_ERRNO,errflag,error); + { + my_error(ER_GET_ERRNO, errflag,error); + /* SET_FATAL_ERROR; */ + } DBUG_VOID_RETURN; } } diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 4f22ffb04de..3259fccebd4 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -5067,17 +5067,17 @@ 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" - 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" + 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" - 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" + 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'" diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index b8a7afbd6c5..9beeca06945 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -162,10 +162,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; } diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 893f3d92caf..cb023c25776 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -762,7 +762,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 */ } From e3d90769109f7c4107aa3a04a4941c4eec9aa693 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 21 Jan 2014 17:20:44 +0100 Subject: [PATCH 104/163] remove an unused error message --- sql/share/errmsg-utf8.txt | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 3259fccebd4..e8d44071a43 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -1822,31 +1822,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-BÅ™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" - jps "%s: 準備完了¥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: 準備完了\nVersion: '%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_2 + eng "You should never see it" ER_NORMAL_SHUTDOWN cze "%s: norm-Bální ukonÄení\n" dan "%s: Normal nedlukning\n" From e8f6f402922295ec36aab42976f3e494455407d4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 21 Jan 2014 17:20:51 +0100 Subject: [PATCH 105/163] clarify plugin-load usage in tokudb.cnf file --- storage/tokudb/tokudb.cnf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/storage/tokudb/tokudb.cnf b/storage/tokudb/tokudb.cnf index 84f98e6d9b9..11e5e832bab 100644 --- a/storage/tokudb/tokudb.cnf +++ b/storage/tokudb/tokudb.cnf @@ -5,5 +5,11 @@ # See https://mariadb.com/kb/en/tokudb-differences/ for differences # between TokuDB in MariaDB and TokuDB from http://www.tokutek.com/ +# Note, that only one plugin-load option will be recognized by the +# MariaDB server. If you uncomment the line below, make sure that +# you don't also have plugin-load options in your other +# my.cnf files. Otherwise, add ha_tokudb.so to the existing +# plugin-load option, instead of uncommenting the line below. + #plugin-load=ha_tokudb.so From 15b4441dcbdf6960a7ed9a15f8f03c01a24451e4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 22 Jan 2014 10:03:32 +0100 Subject: [PATCH 106/163] Percona-Server-5.5.35-rel33.0.tar.gz --- btr/btr0cur.c | 31 ++++++++---- btr/btr0pcur.c | 46 ++++++++---------- buf/buf0buf.c | 6 ++- buf/buf0flu.c | 10 ++++ dict/dict0dict.c | 13 +++++ fil/fil0fil.c | 3 +- handler/ha_innodb.cc | 82 +++++++++++++++++++------------- handler/i_s.cc | 4 ++ ibuf/ibuf0ibuf.c | 29 ++++++++++-- include/btr0cur.h | 15 ++++++ include/btr0pcur.h | 44 +++++++++-------- include/btr0pcur.ic | 4 +- include/btr0sea.h | 2 - include/dict0types.h | 5 ++ include/ibuf0ibuf.h | 5 -- include/log0log.h | 2 + include/univ.i | 2 +- log/log0log.c | 110 ++++++++++++++++++++++++++++++++++++++++++- log/log0online.c | 19 ++++++-- row/row0sel.c | 103 +++++++++++++++++++++++++++++----------- trx/trx0trx.c | 8 ++++ 21 files changed, 406 insertions(+), 137 deletions(-) diff --git a/btr/btr0cur.c b/btr/btr0cur.c index 9adea11f895..ccecbfd64de 100644 --- a/btr/btr0cur.c +++ b/btr/btr0cur.c @@ -61,6 +61,7 @@ Created 10/16/1994 Heikki Tuuri #include "row0upd.h" #include "trx0rec.h" #include "trx0roll.h" /* trx_is_recv() */ +#include "trx0undo.h" #include "que0que.h" #include "row0row.h" #include "srv0srv.h" @@ -1757,7 +1758,7 @@ btr_cur_upd_lock_and_undo( /***********************************************************//** Writes a redo log record of updating a record in-place. */ -UNIV_INLINE +UNIV_INTERN void btr_cur_update_in_place_log( /*========================*/ @@ -1785,18 +1786,30 @@ 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, roll_ptr, log_ptr, - mtr); + if (dict_index_is_clust(index)) { + log_ptr = row_upd_write_sys_vals_to_log( + index, trx, 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/btr/btr0pcur.c b/btr/btr0pcur.c index 3929c4a9c2d..d1b3dc4a3e6 100644 --- a/btr/btr0pcur.c +++ b/btr/btr0pcur.c @@ -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 @@ -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 (UNIV_UNLIKELY(page_get_n_recs(page) == 0)) { /* It must be an empty index tree; NOTE that in this case @@ -239,21 +238,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)) { @@ -277,14 +267,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), @@ -296,9 +286,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); @@ -316,7 +303,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); } } @@ -418,7 +411,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)); @@ -484,7 +477,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/buf/buf0buf.c b/buf/buf0buf.c index 5d82cebe87a..c0909715972 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -4754,12 +4754,16 @@ buf_get_latched_pages_number_instance( case BUF_BLOCK_FILE_PAGE: /* uncompressed page */ break; + case BUF_BLOCK_REMOVE_HASH: + /* We hold flush list but not LRU list mutex here. + Thus encountering BUF_BLOCK_REMOVE_HASH pages is + possible. */ + break; case BUF_BLOCK_ZIP_FREE: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_MEMORY: - case BUF_BLOCK_REMOVE_HASH: ut_error; break; } diff --git a/buf/buf0flu.c b/buf/buf0flu.c index fea665eba40..d47f2d6fa9a 100644 --- a/buf/buf0flu.c +++ b/buf/buf0flu.c @@ -1605,6 +1605,16 @@ buf_flush_page_and_try_neighbors( ut_ad(block_mutex); } + if (UNIV_UNLIKELY(buf_page_get_state(bpage) + == BUF_BLOCK_REMOVE_HASH)) { + + /* In case we don't hold the LRU list mutex, we may see a page + that is about to be relocated on the flush list. Do not + attempt to flush it. */ + ut_ad(flush_type == BUF_FLUSH_LIST); + return (flushed); + } + ut_a(buf_page_in_file(bpage)); if (buf_flush_ready_for_flush(bpage, flush_type)) { diff --git a/dict/dict0dict.c b/dict/dict0dict.c index 5760bc75e34..30f63d569cd 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -36,6 +36,11 @@ UNIV_INTERN dict_index_t* dict_ind_redundant; /** dummy index for ROW_FORMAT=COMPACT supremum and infimum records */ UNIV_INTERN dict_index_t* dict_ind_compact; +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG +/** Flag to control insert buffer debugging. */ +UNIV_INTERN uint ibuf_debug; +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + #ifndef UNIV_HOTBACKUP #include "buf0buf.h" #include "data0type.h" @@ -4855,6 +4860,8 @@ dict_update_statistics( dict_index_t* index; ulint sum_of_index_sizes = 0; + DBUG_EXECUTE_IF("skip_innodb_statistics", return;); + if (table->ibd_file_missing) { ut_print_timestamp(stderr); fprintf(stderr, @@ -4916,6 +4923,12 @@ dict_update_statistics( continue; } +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + if (ibuf_debug && !dict_index_is_clust(index)) { + goto fake_statistics; + } +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + if (UNIV_LIKELY (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO diff --git a/fil/fil0fil.c b/fil/fil0fil.c index f886f347b2f..2ab74b1595d 100644 --- a/fil/fil0fil.c +++ b/fil/fil0fil.c @@ -4369,7 +4369,7 @@ fil_load_single_table_tablespace( if (check_msg) { fprintf(stderr, - "InnoDB: Error: %s in file %s", + "InnoDB: Error: %s in file %s\n", check_msg, filepath); goto func_exit; } @@ -4967,6 +4967,7 @@ fil_extend_space_to_desired_size( space->size += (size_after_extend - start_page_no); os_has_said_disk_full = FALSE; } + fil_node_complete_io(node, fil_system, OS_FILE_READ); goto complete_io; } #endif diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index 6c78c78bafe..ef11a9f2979 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -55,6 +55,7 @@ this program; if not, write to the Free Software Foundation, Inc., #include #include #include +#include #ifdef MYSQL_SERVER #include @@ -8810,6 +8811,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 (prebuilt->table->ibd_file_missing) { + n_rows = HA_POS_ERROR; + goto func_exit; + } if (UNIV_UNLIKELY(!index)) { n_rows = HA_POS_ERROR; goto func_exit; @@ -9533,8 +9538,7 @@ 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; @@ -9591,11 +9595,6 @@ ha_innobase::check( do additional check */ prebuilt->table->corrupted = FALSE; - /* Enlarge the fatal lock wait timeout during CHECK TABLE. */ - mutex_enter(&kernel_mutex); - srv_fatal_semaphore_wait_threshold += SRV_SEMAPHORE_WAIT_EXTENSION; - mutex_exit(&kernel_mutex); - for (index = dict_table_get_first_index(prebuilt->table); index != NULL; index = dict_table_get_next_index(index)) { @@ -9608,21 +9607,42 @@ ha_innobase::check( /* If this is an index being created, break */ 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, - prebuilt->index->name, TRUE); - - push_warning_printf(thd, MYSQL_ERROR::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. */ + mutex_enter(&kernel_mutex); + srv_fatal_semaphore_wait_threshold += + SRV_SEMAPHORE_WAIT_EXTENSION; + mutex_exit(&kernel_mutex); + + ibool valid = TRUE; + valid = btr_validate_index(index, prebuilt->trx); + + /* Restore the fatal lock wait timeout after + CHECK TABLE. */ + mutex_enter(&kernel_mutex); + srv_fatal_semaphore_wait_threshold -= + SRV_SEMAPHORE_WAIT_EXTENSION; + mutex_exit(&kernel_mutex); + + if (!valid) { + is_ok = FALSE; + + innobase_format_name( + index_name, sizeof index_name, + index->name, TRUE); + push_warning_printf(thd, + MYSQL_ERROR::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 @@ -9725,21 +9745,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 */ +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG + /* 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 (!(check_opt->flags & T_QUICK) && !btr_search_validate()) { push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_NOT_KEYFILE, "InnoDB: The adaptive hash index is corrupted."); is_ok = FALSE; } - - /* Restore the fatal lock wait timeout after CHECK TABLE. */ - mutex_enter(&kernel_mutex); - srv_fatal_semaphore_wait_threshold -= SRV_SEMAPHORE_WAIT_EXTENSION; - mutex_exit(&kernel_mutex); - +#endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ prebuilt->trx->op_info = ""; if (thd_killed(user_thd)) { my_error(ER_QUERY_INTERRUPTED, MYF(0)); @@ -10623,6 +10639,7 @@ innodb_show_status( const long MAX_STATUS_SIZE = 1048576; ulint trx_list_start = ULINT_UNDEFINED; ulint trx_list_end = ULINT_UNDEFINED; + bool ret_val; DBUG_ENTER("innodb_show_status"); DBUG_ASSERT(hton == innodb_hton_ptr); @@ -10687,12 +10704,13 @@ innodb_show_status( mutex_exit(&srv_monitor_file_mutex); - 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(FALSE); + DBUG_RETURN(ret_val); } /************************************************************************//** diff --git a/handler/i_s.cc b/handler/i_s.cc index 5316c9d69ed..751efc4dd3f 100644 --- a/handler/i_s.cc +++ b/handler/i_s.cc @@ -48,14 +48,18 @@ extern "C" { #include "btr0types.h" #include "buf0buddy.h" #include "buf0buf.h" +#include "buf0lru.h" #include "ibuf0ibuf.h" #include "dict0mem.h" #include "dict0types.h" #include "dict0boot.h" +#include "dict0load.h" #include "ha_prototypes.h" #include "srv0start.h" +#include "srv0srv.h" #include "trx0i_s.h" #include "trx0rseg.h" +#include "trx0trx.h" #include "trx0undo.h" #include "log0online.h" #include "btr0btr.h" diff --git a/ibuf/ibuf0ibuf.c b/ibuf/ibuf0ibuf.c index 65489d13285..e04b6ac3ba6 100644 --- a/ibuf/ibuf0ibuf.c +++ b/ibuf/ibuf0ibuf.c @@ -194,11 +194,6 @@ access order rules. */ /** Operations that can currently be buffered. */ UNIV_INTERN ibuf_use_t ibuf_use = IBUF_USE_ALL; -#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG -/** Flag to control insert buffer debugging. */ -UNIV_INTERN uint ibuf_debug; -#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ - /** The insert buffer control structure */ UNIV_INTERN ibuf_t* ibuf = NULL; @@ -2693,6 +2688,12 @@ ibuf_contract_ext( return(0); } +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + if (ibuf_debug) { + return(0); + } +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + ibuf_mtr_start(&mtr); /* Open a cursor to a randomly chosen leaf of the tree, at a random @@ -4066,6 +4067,24 @@ updated_in_place: to btr_cur_update_in_place(). */ 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, + NULL, 0, mtr); + DBUG_EXECUTE_IF( + "crash_after_log_ibuf_upd_inplace", + log_buffer_flush_to_disk(); + fprintf(stderr, + "InnoDB: Wrote log record for ibuf " + "update in place operation\n"); + DBUG_SUICIDE(); + ); + + goto updated_in_place; } diff --git a/include/btr0cur.h b/include/btr0cur.h index 97929d44159..7b56c1bbb6e 100644 --- a/include/btr0cur.h +++ b/include/btr0cur.h @@ -637,6 +637,21 @@ btr_cur_set_deleted_flag_for_ibuf( uncompressed */ ibool val, /*!< in: value to set */ mtr_t* mtr); /*!< in/out: mini-transaction */ + +/***********************************************************//** +Writes a redo log record of updating a record in-place. */ +UNIV_INTERN +void +btr_cur_update_in_place_log( +/*========================*/ + ulint flags, /*!< in: flags */ + rec_t* rec, /*!< in: record */ + dict_index_t* index, /*!< in: index where cursor positioned */ + const upd_t* update, /*!< in: update vector */ + trx_t* trx, /*!< in: transaction */ + roll_ptr_t roll_ptr, /*!< in: roll ptr */ + mtr_t* mtr); /*!< in: mtr */ + /*######################################################################*/ /** In the pessimistic delete, if the page data size drops below this diff --git a/include/btr0pcur.h b/include/btr0pcur.h index 4312f73ca4a..d9ce02283d7 100644 --- a/include/btr0pcur.h +++ b/include/btr0pcur.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 @@ -447,6 +447,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. */ @@ -480,10 +501,8 @@ struct btr_pcur_struct{ 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; @@ -499,21 +518,6 @@ struct btr_pcur_struct{ 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/include/btr0pcur.ic b/include/btr0pcur.ic index 696dfc728dc..647e8d0cde9 100644 --- a/include/btr0pcur.ic +++ b/include/btr0pcur.ic @@ -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 @@ -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/include/btr0sea.h b/include/btr0sea.h index 6fa7a2d87bf..39c0a66fb9a 100644 --- a/include/btr0sea.h +++ b/include/btr0sea.h @@ -196,8 +196,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/include/dict0types.h b/include/dict0types.h index 330e6a25114..22407e2408e 100644 --- a/include/dict0types.h +++ b/include/dict0types.h @@ -63,4 +63,9 @@ typedef enum dict_err_ignore dict_err_ignore_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/include/ibuf0ibuf.h b/include/ibuf0ibuf.h index 03ea0629af4..d0d09d3c753 100644 --- a/include/ibuf0ibuf.h +++ b/include/ibuf0ibuf.h @@ -63,11 +63,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/include/log0log.h b/include/log0log.h index b67f362bd98..9e5d0143e18 100644 --- a/include/log0log.h +++ b/include/log0log.h @@ -822,6 +822,8 @@ struct log_struct{ later; this is advanced when a flush operation is completed to all the log groups */ + volatile ibool is_extending; /*!< this is set to true during extend + the log buffer size */ ib_uint64_t written_to_some_lsn; /*!< first log sequence number not yet written to any log group; for this to diff --git a/include/univ.i b/include/univ.i index 7224a496dc7..0ecc38ed0f7 100644 --- a/include/univ.i +++ b/include/univ.i @@ -64,7 +64,7 @@ component, i.e. we show M.N.P as M.N */ (INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR) #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 29.3 +#define PERCONA_INNODB_VERSION 33.0 #endif #define INNODB_VERSION_STR MYSQL_SERVER_VERSION "-" IB_TO_STR(PERCONA_INNODB_VERSION) diff --git a/log/log0log.c b/log/log0log.c index 919fca5527b..74bafa6d27a 100644 --- a/log/log0log.c +++ b/log/log0log.c @@ -262,6 +262,85 @@ 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[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 = mem_alloc(LOG_BUFFER_SIZE + OS_FILE_LOG_BLOCK_SIZE); + log_sys->buf = ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE); + log_sys->buf_size = LOG_BUFFER_SIZE; + memset(log_sys->buf, '\0', 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)); + + fprintf(stderr, + "InnoDB: innodb_log_buffer_size was extended to %lu.\n", + 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 */ @@ -279,10 +358,38 @@ log_open( #endif /* UNIV_LOG_ARCHIVE */ ulint count = 0; - 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. */ + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Warning: " + "The transaction log size is too large" + " for innodb_log_buffer_size (%lu >= %lu / 2). " + "Trying to extend it.\n", + 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 */ @@ -899,6 +1006,7 @@ log_init(void) log_sys->buf = ut_align(log_sys->buf_ptr, OS_FILE_LOG_BLOCK_SIZE); log_sys->buf_size = LOG_BUFFER_SIZE; + log_sys->is_extending = FALSE; memset(log_sys->buf, '\0', LOG_BUFFER_SIZE); diff --git a/log/log0online.c b/log/log0online.c index 5dfe08a4b65..d195a881348 100644 --- a/log/log0online.c +++ b/log/log0online.c @@ -1790,7 +1790,8 @@ 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, + IB_ULONGLONG_MAX)) { if (srv_track_changed_pages) { mutex_exit(&log_bmp_sys->mutex); } @@ -1805,8 +1806,20 @@ 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 != IB_ULONGLONG_MAX)) { + break; } if (!os_file_delete_if_exists(bitmap_files.files[i].name)) { diff --git a/row/row0sel.c b/row/row0sel.c index a2bc44f5894..91af615a543 100644 --- a/row/row0sel.c +++ b/row/row0sel.c @@ -3099,48 +3099,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); } @@ -4141,6 +4171,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; /* ut_print_name(stderr, index->name); fputs(" record not found 3\n", stderr); */ @@ -4180,6 +4218,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; /* ut_print_name(stderr, index->name); fputs(" record not found 4\n", stderr); */ @@ -4757,6 +4803,7 @@ normal_return: if (prebuilt->n_fetch_cached > 0) { row_sel_pop_cached_row_for_mysql(buf, prebuilt); + DEBUG_SYNC_C("row_search_cached_row"); err = DB_SUCCESS; } diff --git a/trx/trx0trx.c b/trx/trx0trx.c index 385a2c9d4f1..09f425cfa55 100644 --- a/trx/trx0trx.c +++ b/trx/trx0trx.c @@ -1306,7 +1306,15 @@ trx_cleanup_at_db_startup( } trx->state = TRX_NOT_STARTED; + + /* This code is executed in a single threaded context, but we acquire + kernel_mutex to satisfy a debug assertion in + trx_release_descriptor(). */ + + mutex_enter(&kernel_mutex); trx_release_descriptor(trx); + mutex_exit(&kernel_mutex); + trx->rseg = NULL; trx->undo_no = 0; trx->last_sql_stat_start.least_undo_no = 0; From c7a5314cb26a2d083b895bab09d9750f76292d3c Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 22 Jan 2014 23:59:21 +0100 Subject: [PATCH 107/163] update test results, broken by MDEV-5547 fix --- mysql-test/r/plugin_auth.result | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result index 824d0f6b0ee..8c9657f4d39 100644 --- a/mysql-test/r/plugin_auth.result +++ b/mysql-test/r/plugin_auth.result @@ -302,7 +302,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 From 3b5f66dbf99c3b640fcc481eab31f5a426a8c42c Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jan 2014 00:02:08 +0100 Subject: [PATCH 108/163] fix XtraDB to compile on Windows --- storage/xtradb/log/log0log.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/storage/xtradb/log/log0log.c b/storage/xtradb/log/log0log.c index 2ec50332779..493fa0202f8 100644 --- a/storage/xtradb/log/log0log.c +++ b/storage/xtradb/log/log0log.c @@ -36,6 +36,12 @@ Created 12/9/1995 Heikki Tuuri #include "log0log.ic" #endif +#ifdef HAVE_ALLOCA_H +#include "alloca.h" +#elif defined(HAVE_MALLOC_H) +#include "malloc.h" +#endif + #ifndef UNIV_HOTBACKUP #include "mem0mem.h" #include "buf0buf.h" @@ -273,7 +279,7 @@ log_buffer_extend( { ulint move_start; ulint move_end; - byte tmp_buf[OS_FILE_LOG_BLOCK_SIZE]; + byte *tmp_buf=alloca(OS_FILE_LOG_BLOCK_SIZE); mutex_enter(&(log_sys->mutex)); From b85ab1d464d193b5b75c8e857461c71cc126f5a2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jan 2014 00:02:22 +0100 Subject: [PATCH 109/163] update debian patches to match the current code state --- ...scripts__mysql_create_system_tables__no_test.dpatch | 10 +++++----- .../patches/38_scripts__mysqld_safe.sh__signals.dpatch | 6 +++--- .../41_scripts__mysql_install_db.sh__no_test.dpatch | 4 ++-- debian/patches/44_scripts__mysql_config__libs.dpatch | 2 +- debian/patches/50_mysql-test__db_test.dpatch | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) 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 4c84e14bf06..a52c198da8d 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,7 +10,7 @@ @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 -@@ -26,8 +26,6 @@ +@@ -30,8 +30,6 @@ SELECT LOWER( REPLACE((SELECT REPLACE(@@ -- 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; @@ -19,12 +19,12 @@ INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; DROP TABLE tmp_db; -@@ -40,8 +38,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,'','' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; +@@ -43,8 +41,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,'','' 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,'',''); 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,'',''); -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"); From 4fadce7ec61ec03f4b394c99b22b76dc80bdf9ac Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jan 2014 00:02:37 +0100 Subject: [PATCH 110/163] Change our INSTALL_DEBUG_SYMBOLS cmake function to be less picky and support MySQL CMakeLists.txt files --- cmake/install_macros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index f2e474395dc..b1af0bbdf39 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -25,10 +25,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}) From 8d2fba9331011b5e52965cef5428e851796e8fc7 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jan 2014 00:02:52 +0100 Subject: [PATCH 111/163] MDEV-5550 Invalid cmake variable in mysql-test/CMakeLists.txt --- mysql-test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt index 16eb2a6f166..227e490331f 100644 --- a/mysql-test/CMakeLists.txt +++ b/mysql-test/CMakeLists.txt @@ -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() From 0cdf1573b698bad3a2de5b726eaab8a6a015e12a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jan 2014 00:03:05 +0100 Subject: [PATCH 112/163] MDEV-5421 Assertion `! is_set()' fails on INSERT IGNORE when a table has no partition for a value make print_no_partition_found() to respect MYF(errflag) mysql-test/suite/parts/t/insert_ignore-5421.test: mdev:5421 --- mysql-test/suite/parts/r/insert_ignore-5421.result | 9 +++++++++ mysql-test/suite/parts/t/insert_ignore-5421.test | 12 ++++++++++++ sql/ha_partition.cc | 2 +- sql/partition_info.cc | 6 +++--- sql/partition_info.h | 2 +- 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 mysql-test/suite/parts/r/insert_ignore-5421.result create mode 100644 mysql-test/suite/parts/t/insert_ignore-5421.test 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/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/sql/ha_partition.cc b/sql/ha_partition.cc index cdb8690ba62..84a48cfed07 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -7207,7 +7207,7 @@ void ha_partition::print_error(int error, myf errflag) { if (!(thd->lex->alter_info.flags & ALTER_TRUNCATE_PARTITION)) { - m_part_info->print_no_partition_found(table); + m_part_info->print_no_partition_found(table, errflag); DBUG_VOID_RETURN; } } diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 8513ed854b7..1bfa8864cb9 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -1330,7 +1330,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; @@ -1344,7 +1344,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 { @@ -1360,7 +1360,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 d3706c8abf4..ffd6e25c45c 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -288,7 +288,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, From 5f5f7befe37e942d4fff0771ac79d143ca4500c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 23 Jan 2014 11:11:01 +0200 Subject: [PATCH 113/163] MDEV-5356: Server crashes in Item_equal::contains on 2nd execution of a PS THD::thd->activate_stmt_arena_if_needed() should be used to temporary activating statement arena instead of direct usage of THD::set_n_backup_active_arena() because possible such scenario: 1) func1 saves current arena and activates copy1 of statement arena 2) func2 saves copy1 of statement arena setup by func1 and activates copy2 3) some changes made for copy 2 4) func2 stores changed copy2 back to statenet arena and activates copy1 5) func1 store unchanged copy1 back to statemnt arena (rewrite changed copy 2 so changes become lost) and activates arena which was before. --- sql/sql_base.cc | 7 ++----- sql/sql_select.cc | 7 ++----- sql/sql_view.cc | 6 +----- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 283d56f6d48..2b0f0daf554 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -7843,12 +7843,9 @@ bool setup_tables(THD *thd, Name_resolution_context *context, { DBUG_ASSERT(table_list->view && table_list->effective_algorithm == VIEW_ALGORITHM_MERGE); - 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); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d8bbabd5f63..6434c045da0 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -882,11 +882,8 @@ JOIN::optimize() 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; diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 27bdfed6bea..8dde595f401 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1121,11 +1121,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) From 2ff76f67506ec056910835d577e6eb88de106b09 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jan 2014 11:04:59 +0100 Subject: [PATCH 114/163] MDEV-5406 add index to an innodb table with a uniqueness violation crashes mysqld After table->file->add_index() in mysql_alter_table() the table in the engine has the intermediate temporary structure, it's neither the original nor the final table structure (it'll be final after successful table->file->drop_index() call). So, when add_index() fails with a unique key violation, we cannot simply get the failed key number and easily map it to the key name and key structure via table->key_info[key_no]. For now we'll create this "intermediate temporary structure", emulating InnoDB internal rules. This bug and the fix will go away in 10.0 that uses completely different online alter table code. mysql-test/t/alter_table_trans.test: mdev:5406 --- mysql-test/r/alter_table_trans.result | 12 +++++++++ mysql-test/t/alter_table_trans.test | 20 +++++++++++++++ sql/sql_table.cc | 37 +++++++++++++++++++++------ 3 files changed, 61 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/alter_table_trans.result b/mysql-test/r/alter_table_trans.result index 3dd5c00d3d8..67ae4075d57 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 Table storage engine for '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/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/sql/sql_table.cc b/sql/sql_table.cc index eda178fcc64..c9f754a204f 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -6893,14 +6893,35 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, /* Only report error if handler has not already reported an error */ if (!thd->is_error()) { - /* - Exchange the key_info for the error message. If we exchange - key number by key name in the message later, we need correct info. - */ - KEY *save_key_info= table->key_info; - table->key_info= key_info; - table->file->print_error(error, MYF(0)); - table->key_info= save_key_info; + /* + HACK HACK HACK + Prepare the list of keys for an error message. + It must match what the engine does internally in ::add_index(). + Here we emulate what innobase_create_key_def() does. + Luckily, in 10.0 this will go away. + */ + KEY *save_key_info= table->key_info; + uint add_cnt= index_add_count, old_cnt= table->s->keys; + KEY *merged= (KEY*)thd->alloc((old_cnt + add_cnt) * sizeof(KEY)); +#define is_PK(K) (!my_strcasecmp(system_charset_info, (K)->name, "PRIMARY")) + + if (is_PK(key_info)) + { + merged[0]= key_info[0]; + if (is_PK(table->key_info)) + { + old_cnt--; + table->key_info++; + } + memcpy(merged + 1, table->key_info, old_cnt * sizeof(KEY)); + memcpy(merged + old_cnt + 1, key_info + 1, (add_cnt - 1) * sizeof(KEY)); + } + else + merged= key_info; + + table->key_info= merged; + table->file->print_error(error, MYF(0)); + table->key_info= save_key_info; } goto err_new_table_cleanup; } From f0fa66a26de19d4f31a0b5466ac064650c81464a Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Thu, 23 Jan 2014 15:41:51 +0400 Subject: [PATCH 115/163] MDEV-5368: Server crashes in Item_in_subselect::optimize on ... - convert_subq_to_sj() must connect child select's tables into parent select's TABLE_LIST::next_local chain. - The problem was that it took child's leaf_tables.head() which is different. This could cause certain tables (in this bug's case, child select's non-merged semi-join) not to be present in TABLE_LIST::next_local chain. Which would cause non-merged semi-join not to be initialized in setup_tables(), which would lead to NULL pointer dereference. --- mysql-test/r/subselect_mat.result | 18 ++++++++++++++++++ mysql-test/r/subselect_sj_mat.result | 18 ++++++++++++++++++ mysql-test/t/subselect_sj_mat.test | 20 ++++++++++++++++++++ sql/opt_subselect.cc | 2 +- 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 62ec0955e88..ce93f70df63 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -2058,6 +2058,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_sj_mat.result b/mysql-test/r/subselect_sj_mat.result index 38ab07882de..2ccb108eb38 100644 --- a/mysql-test/r/subselect_sj_mat.result +++ b/mysql-test/r/subselect_sj_mat.result @@ -2098,4 +2098,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/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test index 58831c4ffb3..4194c0a9e00 100644 --- a/mysql-test/t/subselect_sj_mat.test +++ b/mysql-test/t/subselect_sj_mat.test @@ -1750,5 +1750,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/sql/opt_subselect.cc b/sql/opt_subselect.cc index ec56994f16a..b8780b4c4ca 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -1525,7 +1525,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 */ From 519c7305ac4e1e4bafe0acc56764fa40a0e621ab Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Thu, 23 Jan 2014 21:26:04 +0400 Subject: [PATCH 116/163] MDEV-5368: Server crashes in Item_in_subselect::optimize on ... - convert_subq_to_sj() must connect child select's tables into parent select's TABLE_LIST::next_local chain. - The problem was that it took child's leaf_tables.head() which is different. This could cause certain tables (in this bug's case, child select's non-merged semi-join) not to be present in TABLE_LIST::next_local chain. Which would cause non-merged semi-join not to be initialized in setup_tables(), which would lead to NULL pointer dereference. --- mysql-test/r/subselect_mat.result | 18 ++++++++++++++++++ mysql-test/r/subselect_sj_mat.result | 18 ++++++++++++++++++ mysql-test/t/subselect_sj_mat.test | 20 ++++++++++++++++++++ sql/opt_subselect.cc | 2 +- 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 66b94af5d44..c47881d5434 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -2023,6 +2023,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 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_sj_mat.result b/mysql-test/r/subselect_sj_mat.result index 61ebe3cf5c3..f267f32c887 100644 --- a/mysql-test/r/subselect_sj_mat.result +++ b/mysql-test/r/subselect_sj_mat.result @@ -2063,4 +2063,22 @@ 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 diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test index 840e5436a56..bf5360dd4a7 100644 --- a/mysql-test/t/subselect_sj_mat.test +++ b/mysql-test/t/subselect_sj_mat.test @@ -1706,4 +1706,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); 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 diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index adb67e5169a..07dbb3991b0 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -1509,7 +1509,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 */ From 8f3e1bfc92f725813a6c82f9be2a601c9701d712 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Thu, 23 Jan 2014 22:21:02 +0400 Subject: [PATCH 117/163] MDEV-5419 no audit events for warnings converted to errors in the strict mode. Plugins get error notifications only when my_message_sql() is called. But errors are launched with THD::raise_condition() calls in other places. These are push_warning(), implementations of SIGNAL and RESIGNAL commands. So it makes sence to notify plugins there in THD::raise_condition(). --- .../suite/plugins/r/sql_error_log.result | 45 +++++++++++++++ mysql-test/suite/plugins/t/sql_error_log.test | 55 +++++++++++++++++++ sql/mysqld.cc | 3 +- sql/sql_class.cc | 1 + 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/plugins/r/sql_error_log.result create mode 100644 mysql-test/suite/plugins/t/sql_error_log.test 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..73f3dd34da9 --- /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/sql/mysqld.cc b/sql/mysqld.cc index 73995980ffc..b41cb8126f1 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3165,7 +3165,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= MYSQL_ERROR::WARN_LEVEL_NOTE; @@ -3188,6 +3187,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;); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index f68facb5d14..732840c8d8d 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1145,6 +1145,7 @@ MYSQL_ERROR* THD::raise_condition(uint sql_errno, got_warning= 1; break; case MYSQL_ERROR::WARN_LEVEL_ERROR: + mysql_audit_general(this, MYSQL_AUDIT_GENERAL_ERROR, sql_errno, msg); break; default: DBUG_ASSERT(FALSE); From 5a7ae59305763c1da08f12b65d1dca2a70eb45a4 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Fri, 24 Jan 2014 06:07:22 +0400 Subject: [PATCH 118/163] MDEV-5419 no audit events for warnings converted to errors in the strict mode. small fix in the --replace_regex template. --- mysql-test/suite/plugins/t/sql_error_log.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/plugins/t/sql_error_log.test b/mysql-test/suite/plugins/t/sql_error_log.test index 73f3dd34da9..8d04720aac3 100644 --- a/mysql-test/suite/plugins/t/sql_error_log.test +++ b/mysql-test/suite/plugins/t/sql_error_log.test @@ -50,6 +50,6 @@ 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 / +--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; From 7335c6f2a4319f431f22b79f664881ca265026b0 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 24 Jan 2014 14:30:19 +0200 Subject: [PATCH 119/163] Fixed failures in tokudb test cases storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result: Speed up test storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result: Speed up test Fix results storage/tokudb/mysql-test/tokudb_bugs/r/xa-6.result: Ensure that mysql.proc is properly closed storage/tokudb/mysql-test/tokudb_bugs/t/5733_innodb.test: Speed up test storage/tokudb/mysql-test/tokudb_bugs/t/5733_tokudb.test: Speed up test Accept both index and range scan for one query storage/tokudb/mysql-test/tokudb_bugs/t/xa-6.test: Ensure that mysql.proc is properly closed --- storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result | 2 ++ storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result | 4 +++- storage/tokudb/mysql-test/tokudb_bugs/r/xa-6.result | 1 + storage/tokudb/mysql-test/tokudb_bugs/t/5733_innodb.test | 2 ++ storage/tokudb/mysql-test/tokudb_bugs/t/5733_tokudb.test | 4 ++++ storage/tokudb/mysql-test/tokudb_bugs/t/xa-6.test | 3 +++ 6 files changed, 15 insertions(+), 1 deletion(-) 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; From d15b3386db8de5d2562c78a6e02d404757c787f9 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 24 Jan 2014 14:50:18 +0200 Subject: [PATCH 120/163] Fix for MDEV-5531: double call procedure in one session - hard shutdown the server Main fix was to not cache derivied tables as they may be temporary tables that are deleted before the next query. This was a bit tricky as Item_field::fix_fields depended on cached_tables to be set to resolve some columns. mysql-test/r/sp-bugs.result: Added test case mysql-test/t/sp-bugs.test: Added test case sql/item.cc: Fixed fix_outer_field to handle case where found field did not have in cached_table Idea is that if cached_table is not avaliable, use from_field->table->pos_in_table_list instead sql/records.cc: Also accept INTERNAL_TMP_TABLE for memmap sql/sql_base.cc: More DBUG_PRINT Fixed that setup_natural_join_row_types() is not run twice. Original code modified context->first_name_resolution_table also for second executions. This was wrong as this could give wrong results if some joins had been optimized away between calls. sql/sql_derived.cc: Mark derived tables as internal temporary tables (INTERNAL_TMP_TABLE), not as NON_TRANSACTIONAL_TMP_TABLE. This is more correct as the tables are not visible by the end user. sql/sql_insert.cc: Reset pos_in_table_list before calling fix_fields. One of the consequences of the change of not caching all generated tables in Item_ident is that pos_in_table_list needs to be correct in calls to fix_fields. sql/sql_lex.cc: More DBUG_PRINT sql/sql_parse.cc: Don't cache derivied tables as they may be temporary tables that are deleted before the next query sql/sql_select.cc: Reset table_vector. This was required as some code checked the vector to see if temporary tables had already been created. sql/table.cc: Mark tables with field translations as cacheable (as these will not disapper between stmt executions. --- mysql-test/r/sp-bugs.result | 46 ++++++++++++++++++++++++++++ mysql-test/t/sp-bugs.test | 57 +++++++++++++++++++++++++++++++++++ sql/item.cc | 54 +++++++++++++++++++++++++-------- sql/records.cc | 3 +- sql/sql_base.cc | 60 +++++++++++++++++++++++-------------- sql/sql_derived.cc | 2 +- sql/sql_insert.cc | 3 ++ sql/sql_lex.cc | 10 +++++-- sql/sql_parse.cc | 7 ++++- sql/sql_select.cc | 8 +++-- sql/table.cc | 9 ++++-- 11 files changed, 213 insertions(+), 46 deletions(-) diff --git a/mysql-test/r/sp-bugs.result b/mysql-test/r/sp-bugs.result index 9d9deaebcc3..2442adc46b3 100644 --- a/mysql-test/r/sp-bugs.result +++ b/mysql-test/r/sp-bugs.result @@ -222,3 +222,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/t/sp-bugs.test b/mysql-test/t/sp-bugs.test index 3ab1689e8b2..67924996423 100644 --- a/mysql-test/t/sp-bugs.test +++ b/mysql-test/t/sp-bugs.test @@ -228,3 +228,60 @@ DROP PROCEDURE testp_bug11763507; 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/sql/item.cc b/sql/item.cc index bfe065ceced..7b1ca3c0849 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -4700,6 +4700,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. @@ -4709,10 +4715,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: @@ -4742,7 +4754,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 @@ -4761,6 +4778,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) @@ -4777,7 +4803,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 @@ -4976,9 +5002,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); @@ -5049,6 +5075,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 @@ -5134,11 +5161,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) diff --git a/sql/records.cc b/sql/records.cc index 2f74030d5c4..aca950d7435 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/sql_base.cc b/sql/sql_base.cc index f689d96b4cf..84e5ee49fc4 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -235,6 +235,7 @@ static void check_unused(THD *thd) uint count= 0, open_files= 0, idx= 0; TABLE *cur_link, *start_link, *entry; TABLE_SHARE *share; + DBUG_ENTER("check_unused"); if ((start_link=cur_link=unused_tables)) { @@ -243,7 +244,7 @@ static void check_unused(THD *thd) if (cur_link != cur_link->next->prev || cur_link != cur_link->prev->next) { DBUG_PRINT("error",("Unused_links aren't linked properly")); /* purecov: inspected */ - return; /* purecov: inspected */ + DBUG_VOID_RETURN; /* purecov: inspected */ } } while (count++ < table_cache_count && (cur_link=cur_link->next) != start_link); @@ -291,6 +292,7 @@ static void check_unused(THD *thd) DBUG_PRINT("error",("Unused_links doesn't match open_cache: diff: %d", /* purecov: inspected */ count)); /* purecov: inspected */ } + DBUG_VOID_RETURN; } #else #define check_unused(A) @@ -3103,6 +3105,7 @@ retry_share: MDL_deadlock_handler mdl_deadlock_handler(ot_ctx); bool wait_result; + DBUG_PRINT("info", ("old version of table share found")); release_table_share(share); mysql_mutex_unlock(&LOCK_open); @@ -3127,6 +3130,7 @@ retry_share: and try to reopen them. Note: refresh_version is currently changed only during FLUSH TABLES. */ + DBUG_PRINT("info", ("share version differs between tables")); release_table_share(share); mysql_mutex_unlock(&LOCK_open); (void)ot_ctx->request_backoff_action(Open_table_context::OT_REOPEN_TABLES, @@ -3139,12 +3143,17 @@ retry_share: { table= share->free_tables.front(); table_def_use_table(thd, table); - /* We need to release share as we have EXTRA reference to it in our hands. */ + /* + We need to release share as we have EXTRA reference to it in our hands. + */ + DBUG_PRINT("info", ("release temporarily acquired table share")); release_table_share(share); } else { - /* We have too many TABLE instances around let us try to get rid of them. */ + /* + We have too many TABLE instances around let us try to get rid of them. + */ while (table_cache_count > table_cache_size && unused_tables) free_cache_entry(unused_tables); @@ -3217,6 +3226,7 @@ err_unlock: release_table_share(share); mysql_mutex_unlock(&LOCK_open); + DBUG_PRINT("exit", ("failed")); DBUG_RETURN(TRUE); } @@ -6973,7 +6983,7 @@ find_field_in_tables(THD *thd, Item_ident *item, */ if (db) return cur_field; - + if (found) { if (report_error == REPORT_ALL_ERRORS || @@ -6988,7 +6998,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 @@ -7919,6 +7929,7 @@ err: TRUE Error FALSE OK */ + static bool setup_natural_join_row_types(THD *thd, List *from_clause, Name_resolution_context *context) @@ -7928,6 +7939,18 @@ 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) + { + DBUG_PRINT("info", ("using cached store_top_level_join_columns")); + DBUG_RETURN(false); + } + context->select_lex->first_natural_join_processing= false; + List_iterator_fast table_ref_it(*from_clause); TABLE_LIST *table_ref; /* Current table reference. */ /* Table reference to the left of the current. */ @@ -7944,22 +7967,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; } @@ -7973,8 +7989,6 @@ 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; - DBUG_RETURN (false); } @@ -8576,7 +8590,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; diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index accc3012e9e..b7425b188a0 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -716,7 +716,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_insert.cc b/sql/sql_insert.cc index 306d5c8d306..10e943458bd 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2386,6 +2386,9 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) bitmap= (uchar*) (field + share->fields + 1); copy->record[0]= (bitmap + share->column_bitmap_size*3); memcpy((char*) copy->record[0], (char*) table->record[0], share->reclength); + /* 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 diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 665d5b2724f..fa1bd5a96fa 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -2127,14 +2127,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); @@ -2325,7 +2326,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(arena->alloc(sizeof(Item*) * n_elems)); if (ref_pointer_array != NULL) @@ -3328,6 +3332,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; @@ -3356,6 +3361,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; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8ebdd3861e7..20fba8e49ae 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1957,6 +1957,7 @@ mysql_execute_command(THD *thd) bool have_table_map_for_update= FALSE; #endif DBUG_ENTER("mysql_execute_command"); + #ifdef WITH_PARTITION_STORAGE_ENGINE thd->work_part_info= 0; #endif @@ -6128,7 +6129,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 */ diff --git a/sql/sql_select.cc b/sql/sql_select.cc index dfbf5e144e5..9247485278d 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3180,7 +3180,7 @@ make_join_statistics(JOIN *join, 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 @@ -14802,7 +14802,8 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List &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))); @@ -16258,7 +16259,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_proc_info(thd, "removing tmp table"); diff --git a/sql/table.cc b/sql/table.cc index b0be0791cd6..932ca953c40 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -4089,6 +4089,7 @@ bool TABLE_LIST::create_field_translation(THD *thd) uint field_count= 0; Query_arena *arena= thd->stmt_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()) @@ -4109,7 +4110,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. */ @@ -4122,7 +4123,7 @@ bool TABLE_LIST::create_field_translation(THD *thd) field_translation_updated= TRUE; } - return FALSE; + DBUG_RETURN(FALSE); } if (arena->is_conventional()) @@ -4148,12 +4149,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); } From d106dc059746157239d951551093fec049a7b73a Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 24 Jan 2014 16:50:39 +0400 Subject: [PATCH 121/163] MDEV-5504 Server crashes in String::length on SELECT with MONTHNAME, GROUP BY, ROLLUP The crash happened because Item_func_monthname was derived from Item_func_month, so Item_func_monthname::is_null() did not work fine. Backporting a change from 5.5: Item_func_monthname is now derived from Item_str_func. --- mysql-test/r/func_time.result | 12 +++++++++++- mysql-test/t/func_time.test | 9 +++++++++ sql/item_timefunc.cc | 13 +++++-------- sql/item_timefunc.h | 5 ++--- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 7020007f940..ddbf42c8060 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -162,7 +162,7 @@ dayname("1962-03-03") dayname("1962-03-03")+0 Saturday 5 select monthname("1972-03-04"),monthname("1972-03-04")+0; monthname("1972-03-04") monthname("1972-03-04")+0 -March 3 +March 0 select time_format(000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T'),date_format(19980131000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T'); time_format(000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T') date_format(19980131000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T') 00|12|0|12|00|AM|12:00:00 AM|00|00:00:00 00|12|0|12|00|AM|12:00:00 AM|00|00:00:00 @@ -2347,3 +2347,13 @@ 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 +# +# 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; diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 91ccb06655e..2e8716f3297 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1417,3 +1417,12 @@ 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')); + + +--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; diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index b618ec038f2..b5d43786248 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -883,16 +883,13 @@ String* Item_func_monthname::val_str(String* str) { DBUG_ASSERT(fixed == 1); const char *month_name; - uint month= (uint) val_int(); uint err; + MYSQL_TIME ltime; - if (null_value || !month) - { - null_value=1; - return (String*) 0; - } - null_value=0; - month_name= locale->month_names->type_names[month-1]; + if ((null_value= (get_arg0_date(<ime, 0) || !ltime.month))) + return (String *) 0; + + month_name= locale->month_names->type_names[ltime.month - 1]; str->copy(month_name, (uint) strlen(month_name), &my_charset_utf8_bin, collation.collation, &err); return str; diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index d97a5fbc903..7d865df8fea 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -134,14 +134,13 @@ public: }; -class Item_func_monthname :public Item_func_month +class Item_func_monthname :public Item_str_func { MY_LOCALE *locale; public: - Item_func_monthname(Item *a) :Item_func_month(a) {} + Item_func_monthname(Item *a) :Item_str_func(a) {} const char *func_name() const { return "monthname"; } String *val_str(String *str); - enum Item_result result_type () const { return STRING_RESULT; } void fix_length_and_dec(); bool check_partition_func_processor(uchar *int_arg) {return TRUE;} bool check_vcol_func_processor(uchar *int_arg) {return FALSE;} From 4d83f579da713156586abb2e66ed4b2c370a9ce4 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 24 Jan 2014 19:44:13 +0200 Subject: [PATCH 122/163] Fixed Mageia Bug 12355: mariadb produces warning messages while loading timezone information - Warnings about wrong symlink messages or non-timezone files with '.tab' are now only given if run with --verbose - Added long option handling - Added --help, --verbose and --version options sql/tztime.cc: Add usage of my_getopt, to get long options --- sql/tztime.cc | 189 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 152 insertions(+), 37 deletions(-) diff --git a/sql/tztime.cc b/sql/tztime.cc index 4ae1accd440..7cfae1529ab 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -41,6 +41,8 @@ #include #include "tztime.h" #include +#include +#include #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 { @@ -2386,7 +2390,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. @@ -2471,6 +2474,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 @@ -2479,6 +2491,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 @@ -2494,7 +2508,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; @@ -2534,12 +2548,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); - continue; + + /* + 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; @@ -2552,10 +2575,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)); } @@ -2574,30 +2615,109 @@ 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; } - - 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 " @@ -2612,32 +2732,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); - 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; - } + 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; } From e1f94a69858e9ca35e30d748f37ba3d1b6da8e7c Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Fri, 24 Jan 2014 23:40:48 +0400 Subject: [PATCH 123/163] MDEV-5337: Wrong result in mariadb 5.5.32 with ORDER BY + LIMIT when index_condition_pushdown=on - in test_if_skip_sort_order(), correct the condition under which we have the code that restores the previously pushed index condition. --- mysql-test/r/innodb_icp.result | 25 +++++++++++++++++++++++++ mysql-test/t/innodb_icp.test | 28 ++++++++++++++++++++++++++++ sql/sql_select.cc | 2 +- 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index 07c75986392..e34a4469de2 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -907,5 +907,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/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/sql/sql_select.cc b/sql/sql_select.cc index dfbf5e144e5..cbca58673dd 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -19477,7 +19477,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. From 669c6620af9a9996a66ca9b339d4fb05eb6bf944 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sat, 25 Jan 2014 00:26:40 +0400 Subject: [PATCH 124/163] [Backport to 5.3] MDEV-5337: Wrong result in mariadb 5.5.32 with ORDER BY + LIMIT when index_condition_pushdown=on - in test_if_skip_sort_order(), correct the condition under which we have the code that restores the previously pushed index condition. --- mysql-test/r/innodb_icp.result | 25 +++++++++++++++++++++++++ mysql-test/t/innodb_icp.test | 28 ++++++++++++++++++++++++++++ sql/sql_select.cc | 2 +- 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index 53a76b2a3f3..19c4ac25a88 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -851,5 +851,30 @@ insert into t1 values ('',1); select 1 from t1 where b <= 1 and a <> ''; 1 drop table t1; +# +# 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/t/innodb_icp.test b/mysql-test/t/innodb_icp.test index 0fb42355f96..f7828ec7bb2 100644 --- a/mysql-test/t/innodb_icp.test +++ b/mysql-test/t/innodb_icp.test @@ -12,6 +12,34 @@ set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; --source include/icp_tests.inc +--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/sql/sql_select.cc b/sql/sql_select.cc index 289b75b5804..3e5652f2a16 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -19091,7 +19091,7 @@ check_reverse_order: tab->limit= best_select_limit; } } - 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. From 3d67c68ad1219fff48a341f2197709bbca14f84f Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sat, 25 Jan 2014 15:41:08 +0200 Subject: [PATCH 125/163] Fixed MDEV-4970: Wrong result with Aria table populated with disabled keys Problem was that ALTER TABLE DISABLE KEYS incremented create_trid for the table, which made the new index entries invisible until the global trid catched up. Fixed by only updating create_trid if we are rewriting all rows and indexes. mysql-test/suite/maria/alter.result: Added test case mysql-test/suite/maria/alter.test: Added test case storage/maria/ha_maria.cc: Only updating create_trid if we are doing a full repair (and thus rewriting all rows and indexes). storage/maria/trnman.c: More DBUG_PRINT --- mysql-test/suite/maria/alter.result | 33 +++++++++++++++++++++++++++++ mysql-test/suite/maria/alter.test | 27 +++++++++++++++++++++++ storage/maria/ha_maria.cc | 11 ++++++++-- storage/maria/trnman.c | 4 ++-- 4 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 mysql-test/suite/maria/alter.result create mode 100644 mysql-test/suite/maria/alter.test diff --git a/mysql-test/suite/maria/alter.result b/mysql-test/suite/maria/alter.result new file mode 100644 index 00000000000..65e4cb74819 --- /dev/null +++ b/mysql-test/suite/maria/alter.result @@ -0,0 +1,33 @@ +drop table if exists t1; +Warnings: +Note 1051 Unknown table '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/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 94057f57de5..26ab75cbdc0 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -1547,7 +1547,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; @@ -1646,6 +1646,11 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize) } 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= !test(param->testflag & T_QUICK); } if (!error) { @@ -1669,7 +1674,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(); @@ -1962,6 +1968,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); diff --git a/storage/maria/trnman.c b/storage/maria/trnman.c index 2e27d8a4dc5..e5077adc9b7 100644 --- a/storage/maria/trnman.c +++ b/storage/maria/trnman.c @@ -383,8 +383,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); } From b816a2d43be136c328dba502c294d390323ce458 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 25 Jan 2014 14:52:20 +0100 Subject: [PATCH 126/163] add all csv extensions to the ha_tina_exts[] array --- storage/csv/ha_tina.cc | 1 + 1 file changed, 1 insertion(+) 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 }; From 46c4f3a785680e231924cc7cd2521727ac2a2623 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sun, 26 Jan 2014 20:46:15 +0200 Subject: [PATCH 127/163] speed up tokudb tests by adding begin/commit around insert loops Marked very long running tests as big_test --- .../mysql-test/tokudb/r/hotindex-del-0.result | 2 + .../mysql-test/tokudb/r/hotindex-del-1.result | 2 + .../tokudb/r/hotindex-del-fast.result | 2 + .../tokudb/r/hotindex-del-slow.result | 2 + .../tokudb/r/hotindex-insert-0.result | 2 + .../tokudb/r/hotindex-insert-1.result | 2 + .../tokudb/r/hotindex-update-0.result | 2 + .../tokudb/r/hotindex-update-1.result | 2 + .../mysql-test/tokudb/t/hotindex-del-0.test | 4 + .../mysql-test/tokudb/t/hotindex-del-1.test | 4 + .../tokudb/t/hotindex-del-fast.test | 4 + .../tokudb/t/hotindex-del-slow.test | 4 + .../tokudb/t/hotindex-insert-0.test | 4 + .../tokudb/t/hotindex-insert-1.test | 4 + .../tokudb/t/hotindex-insert-2.test | 4 + .../tokudb/t/hotindex-insert-bigchar.test | 4 + .../tokudb/t/hotindex-update-0.test | 4 + .../tokudb/t/hotindex-update-1.test | 4 + .../tokudb_alter_table/r/hcad_all_add3.result | 434 +++++++++++++++++ .../r/hcad_all_blob_add.result | 434 +++++++++++++++++ .../r/hcad_all_blob_drop.result | 40 ++ .../tokudb_alter_table/r/hcad_all_drop.result | 308 +++++++++++++ .../r/hcad_all_fixed_add.result | 434 +++++++++++++++++ .../r/hcad_all_var_drop.result | 40 ++ .../r/hcad_fixedblob_add.result | 434 +++++++++++++++++ .../r/hcad_fixedblob_add2.result | 434 +++++++++++++++++ .../r/hcad_fixedvar_add.result | 434 +++++++++++++++++ .../r/hcad_fixedvar_add2.result | 434 +++++++++++++++++ .../r/hcad_fixedvar_drop.result | 140 ++++++ .../r/hcad_varblob_add.result | 434 +++++++++++++++++ .../tokudb_alter_table/t/hcad_all_add.test | 436 ++++++++++++++++++ .../tokudb_alter_table/t/hcad_all_add2.test | 2 + .../tokudb_alter_table/t/hcad_all_add3.test | 436 ++++++++++++++++++ .../t/hcad_all_blob_add.test | 436 ++++++++++++++++++ .../t/hcad_all_blob_drop.test | 42 ++ .../tokudb_alter_table/t/hcad_all_drop.test | 310 +++++++++++++ .../t/hcad_all_fixed_add.test | 436 ++++++++++++++++++ .../t/hcad_all_fixed_drop.test | 2 + .../t/hcad_all_var_add.test | 2 + .../t/hcad_all_var_drop.test | 42 ++ .../t/hcad_fixedblob_add.test | 434 +++++++++++++++++ .../t/hcad_fixedblob_add2.test | 434 +++++++++++++++++ .../t/hcad_fixedvar_add.test | 434 +++++++++++++++++ .../t/hcad_fixedvar_add2.test | 434 +++++++++++++++++ .../t/hcad_fixedvar_drop.test | 140 ++++++ .../t/hcad_varblob_add.test | 434 +++++++++++++++++ 46 files changed, 8510 insertions(+) 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 3ab09c07935..c992937afd8 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 clustering index i_a on s(a); 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/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_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; From 6e699eb409df090fd3ac77d68d11e31990405954 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sun, 26 Jan 2014 21:47:31 +0100 Subject: [PATCH 128/163] Fixed bug that I accidently introduced in mysql_tzinfo_to_sql Added test cases mysql-test/r/mysql_tzinfo_to_sql_symlink.result: Updated results mysql-test/std_data/zoneinfo/garbage: test file mysql-test/std_data/zoneinfo/ignored.tab: test file mysql-test/t/mysql_tzinfo_to_sql_symlink.test: Added test cases for all options sql/tztime.cc: Better error messages. Fixed wrong place for 'continue' --- .../r/mysql_tzinfo_to_sql_symlink.result | 40 +++++++++++++++++++ mysql-test/t/mysql_tzinfo_to_sql_symlink.test | 24 +++++++++++ sql/tztime.cc | 7 ++-- 3 files changed, 68 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result index fce61687c83..dda732937ee 100644 --- a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result +++ b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result @@ -1,6 +1,7 @@ # # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above # +# Verbose run TRUNCATE TABLE time_zone; TRUNCATE TABLE time_zone_name; TRUNCATE TABLE time_zone_transition; @@ -11,12 +12,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/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/sql/tztime.cc b/sql/tztime.cc index 7cfae1529ab..da23d6fc8c2 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2558,8 +2558,8 @@ scan_tz_dir(char * name_end, uint symlink_recursion_level, uint verbose) fflush(stdout); fprintf(stderr, "Warning: Skipping directory '%s': " "to avoid infinite symlink recursion.\n", fullname); - continue; } + continue; } if (scan_tz_dir(name_end_tmp, symlink_recursion_level + is_symlink, verbose)) @@ -2720,8 +2720,9 @@ main(int argc, char **argv) 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; } From fb018850dc04f15234e3b1afdfb5911f28f9ecb9 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sun, 26 Jan 2014 21:48:23 +0100 Subject: [PATCH 129/163] Fixed that setup_natural_join_row_types can safely be called twice sql/item.h: Added cache for setup_natural_join_row_types sql/sql_base.cc: Cache old value of first_name_resolution_table for next call. (It's not safe to try to recalculate the value as the join structure may have been changed by the optimizer) --- sql/item.h | 2 ++ sql/sql_base.cc | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sql/item.h b/sql/item.h index c4fe24bf482..20b7104bcda 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 diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 1dbb23226ef..723c4f2c50d 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -7925,6 +7925,11 @@ 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 @@ -7946,7 +7951,8 @@ static bool setup_natural_join_row_types(THD *thd, */ if (!context->select_lex->first_natural_join_processing) { - DBUG_PRINT("info", ("using cached store_top_level_join_columns")); + 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; @@ -7989,6 +7995,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(); + /* + 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); } From 680288873c4dd0418657fbc718687b1f91e2afbd Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sun, 26 Jan 2014 21:48:42 +0100 Subject: [PATCH 130/163] Fix for MDEV-5168: MariaDB returns warnings for INSERT IGNORE Added variable "OLD_MODE" that can be used to turn off the new behavior mysql-test/r/insert.result: Added test case mysql-test/r/mysqld--help.result: Added old_mode mysql-test/suite/sys_vars/r/old_mode_basic.result: Added testing of new variable mysql-test/suite/sys_vars/t/old_mode_basic.test: Added testing of new variable mysql-test/t/insert.test: Added test case sql/sql_class.h: Added bit flags for OLD_MODE sql/sql_insert.cc: Disable duplicate key warnings for INSERT IGNORE of OLD_MODE NO_DUP_KEY_WARNINGS_WITH_IGNORE is used sql/sql_show.cc: Don't show progress reporting on SHOW PROCESSLIST if OLD_MODE NO_PROGRESS_INFO is used sql/sys_vars.cc: Added OLD_MODE --- mysql-test/r/insert.result | 20 ++ mysql-test/r/mysqld--help.result | 7 +- .../suite/sys_vars/r/old_mode_basic.result | 174 +++++++++++++ .../suite/sys_vars/t/old_mode_basic.test | 244 ++++++++++++++++++ mysql-test/t/insert.test | 18 ++ sql/sql_class.h | 5 + sql/sql_insert.cc | 8 +- sql/sql_show.cc | 6 +- sql/sys_vars.cc | 26 +- 9 files changed, 502 insertions(+), 6 deletions(-) create mode 100644 mysql-test/suite/sys_vars/r/old_mode_basic.result create mode 100644 mysql-test/suite/sys_vars/t/old_mode_basic.test 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/mysqld--help.result b/mysql-test/r/mysqld--help.result index c36cc96bb1a..16da8eae7f9 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -454,8 +454,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 @@ -997,6 +1001,7 @@ 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 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..c9a650e7b15 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/old_mode_basic.result @@ -0,0 +1,174 @@ +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; +ERROR 42000: Variable 'old_mode' can't be set to the value of '4' +SELECT @@global.old_mode; +@@global.old_mode +NO_PROGRESS_INFO +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/t/old_mode_basic.test b/mysql-test/suite/sys_vars/t/old_mode_basic.test new file mode 100644 index 00000000000..6770219887d --- /dev/null +++ b/mysql-test/suite/sys_vars/t/old_mode_basic.test @@ -0,0 +1,244 @@ +#################### 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; + +--Error ER_WRONG_VALUE_FOR_VAR +SET @@global.old_mode = 4; +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/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/sql/sql_class.h b/sql/sql_class.h index a21917a0814..c25a5f82eac 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -108,6 +108,10 @@ enum enum_filetype { FILETYPE_CSV, FILETYPE_XML }; #define MODE_NO_ENGINE_SUBSTITUTION (MODE_HIGH_NOT_PRECEDENCE*2) #define MODE_PAD_CHAR_TO_FULL_LENGTH (ULL(1) << 31) +/* Bits for different old style modes */ +#define OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE 1 +#define OLD_MODE_NO_PROGRESS_INFO 2 + extern char internal_table_name[2]; extern char empty_c_string[1]; extern MYSQL_PLUGIN_IMPORT const char **errmesg; @@ -473,6 +477,7 @@ typedef struct system_variables ulonglong long_query_time; ulonglong optimizer_switch; ulonglong sql_mode; ///< which non-standard SQL behaviour should be enabled + ulonglong 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; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 10e943458bd..0bc1453ddef 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1714,7 +1714,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; @@ -1844,7 +1846,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; } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 5104eb7bb3f..20b2b9cc7b8 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2174,7 +2174,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; @@ -2280,7 +2281,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 */ diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 5b4d4fdb4eb..49b90006000 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1390,7 +1390,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( @@ -2211,6 +2211,30 @@ 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", + 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 From 0df3c2033bdf96272c426295e1f711e1299a62ac Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 26 Jan 2014 21:49:04 +0100 Subject: [PATCH 131/163] fix the test for MDEV-5029 to clean up after itself --- mysql-test/t/bad_frm_crash_5029.test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql-test/t/bad_frm_crash_5029.test b/mysql-test/t/bad_frm_crash_5029.test index 858922886ab..dadfc86e28e 100644 --- a/mysql-test/t/bad_frm_crash_5029.test +++ b/mysql-test/t/bad_frm_crash_5029.test @@ -18,3 +18,6 @@ copy_file std_data/mdev5029_2.MAI $datadir/test/t1.MAI; copy_file std_data/mdev5029_2.MAD $datadir/test/t1.MAD; show create table t1; drop table t1; +remove_file $datadir/test/t1.MAI; +remove_file $datadir/test/t1.MAD; + From 3f2f9c36b16ad88d34a400f92cbb61e77a6ae63c Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 26 Jan 2014 21:49:11 +0100 Subject: [PATCH 132/163] move innodb specific test from group_by.test to group_by_innodb.test --- mysql-test/r/group_by.result | 26 -------------------------- mysql-test/r/group_by_innodb.result | 28 +++++++++++++++++++++++++++- mysql-test/t/group_by.test | 25 ------------------------- mysql-test/t/group_by_innodb.test | 27 ++++++++++++++++++++++++++- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 553607dc03f..a9e91199949 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -2473,29 +2473,3 @@ c 1c 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; diff --git a/mysql-test/r/group_by_innodb.result b/mysql-test/r/group_by_innodb.result index 86d431b00d2..4b5d9990c51 100644 --- a/mysql-test/r/group_by_innodb.result +++ b/mysql-test/r/group_by_innodb.result @@ -29,5 +29,31 @@ SELECT COUNT(*), pk field1 FROM t1 WHERE a = 'r' OR pk = 183 GROUP BY field1, field1; COUNT(*) field1 drop table t1; -End of 5.5 tests 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/t/group_by.test b/mysql-test/t/group_by.test index e4120f284de..c6d594edc1f 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; @@ -1645,26 +1643,3 @@ 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; diff --git a/mysql-test/t/group_by_innodb.test b/mysql-test/t/group_by_innodb.test index 9733610dde1..df213cc189f 100644 --- a/mysql-test/t/group_by_innodb.test +++ b/mysql-test/t/group_by_innodb.test @@ -39,6 +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 -set optimizer_switch=@save_ext_key_optimizer_switch; From 90e2240869b9e0eba4fb8a87003e0d001872228e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 26 Jan 2014 21:49:19 +0100 Subject: [PATCH 133/163] MDEV-5461 Assertion `length <= column->length' fails in write_block_record with functions in select list, GROUP BY, ORDER BY Old code in create_tmp_table(), that created an extra one-byte field (recinfo) before every NULL-able grouping field (Field) in the tmp table, did not actually work. Because the matching code in end_update(), that was supposed to update this byte, was using a wrong offset, updating the first byte of the Field, not a byte before it. Normally this wasn't an issue, because the Field value (written later in end_update) was overwriting this byte anyway. But in this bug the Field was Field_null, with zero length, so end_update() was overwriting the first byte of the following field. And the following field was not-nullable constant, which was stored only once in create_tmp_table and never updated later. Fixed by removing the code that didn't do any useful work anyway. --- mysql-test/r/group_by_null.result | 6 ++++++ mysql-test/t/group_by_null.test | 7 +++++++ sql/sql_select.cc | 32 ++----------------------------- 3 files changed, 15 insertions(+), 30 deletions(-) create mode 100644 mysql-test/r/group_by_null.result create mode 100644 mysql-test/t/group_by_null.test 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/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/sql/sql_select.cc b/sql/sql_select.cc index 3f515b27278..5d7594bf3d7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -15243,23 +15243,8 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List &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++; @@ -18186,19 +18171,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 */ From 8ece9de8331798c3fefceebe72e43b1c40d06a99 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 26 Jan 2014 21:49:31 +0100 Subject: [PATCH 134/163] workaround test failures in buildbot: in some VMs readline thinks that the window size is zero. ignore it. --- client/mysql.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index c2bfdce2f74..5e4e80373ad 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1408,7 +1408,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 From 879a05ce3f95a2abb3d9c50459e73fdb6094ed19 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 26 Jan 2014 21:49:39 +0100 Subject: [PATCH 135/163] improve oqgraph boost check to filter out newer boost versions --- storage/oqgraph/CMakeLists.txt | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt index 593fced6235..7b110b7de5a 100644 --- a/storage/oqgraph/CMakeLists.txt +++ b/storage/oqgraph/CMakeLists.txt @@ -11,26 +11,44 @@ IF(MSVC) SET(BOOST_OK 0) ELSE() SET(BOOST_OK 1) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") ENDIF() ELSE() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing") + STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # See if that works. On old gcc it'll fail because of -fno-rtti CHECK_CXX_SOURCE_COMPILES( " #include #include -int main() { return 0; } +#include + +using namespace boost; +struct VertexInfo { int id; }; + +namespace boost +{ + namespace graph + { + template<> struct internal_vertex_name + { typedef multi_index::member type; }; + } +} + +typedef adjacency_list Graph; +int main() +{ + graph_traits::vertex_descriptor *orig; + Graph *g; + remove_vertex(*orig, *g); + return 0; +} " BOOST_OK) ENDIF() IF(BOOST_OK) ADD_DEFINITIONS(-DHAVE_OQGRAPH) - IF(MSVC) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") - ELSE(MSVC) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing") - STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - ENDIF(MSVC) MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc STORAGE_ENGINE MODULE_ONLY) From 7ea9d1e692c69c8715d98a9dbc44289d47a65447 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 27 Jan 2014 13:15:40 +0400 Subject: [PATCH 136/163] MDEV-5458 RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(...): Assertion `mon > 0 && mon < 13' failed.' --- mysql-test/r/func_time.result | 24 ++++++++++++++++++++++++ mysql-test/r/type_date.result | 2 +- mysql-test/r/type_time.result | 2 +- mysql-test/t/func_time.test | 11 +++++++++++ sql/item_func.cc | 12 +++++++----- sql/item_timefunc.cc | 22 ++++------------------ sql/mysql_priv.h | 1 + sql/time.cc | 14 ++++++++++++++ 8 files changed, 63 insertions(+), 25 deletions(-) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index ddbf42c8060..ac336418823 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2348,6 +2348,30 @@ 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 # +# 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') +NULL +NULL +Warnings: +Warning 1292 Truncated incorrect time value: '1296:00:00' +Warning 1292 Incorrect datetime value: '838:59:59' +Warning 1292 Truncated incorrect time value: '1296:00:00' +Warning 1292 Incorrect datetime value: '838:59:59' +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); diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index e452b3255ae..b7776d67651 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -305,7 +305,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_time.result b/mysql-test/r/type_time.result index 84cd6ca4d9e..26e42d3b3b2 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -180,7 +180,7 @@ 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' +Warning 1292 Incorrect datetime value: '00:00:00' # # MDEV-4652 Wrong result for CONCAT(GREATEST(TIME('00:00:01'),TIME('00:00:00'))) # diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 2e8716f3297..4205a70ee56 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1418,6 +1418,17 @@ 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')); +--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 diff --git a/sql/item_func.cc b/sql/item_func.cc index 03cd6b5139d..d6a63348dc2 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2635,11 +2635,6 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, uint 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; @@ -2650,8 +2645,15 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, uint 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, + min(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 0; } diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index b5d43786248..ebc61e02a82 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2448,7 +2448,7 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, uint 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 { @@ -2499,16 +2499,7 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, uint fuzzy_date) } ltime->hour+= days*24; - - MYSQL_TIME copy= *ltime; - Lazy_string_time str(©); - - check_time_range(ltime, decimals, &was_cut); - if (was_cut) - make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, - &str, MYSQL_TIMESTAMP_TIME, NullS); - - return (null_value= 0); + return (null_value= adjust_time_range_with_warn(ltime, decimals)); } @@ -2546,7 +2537,7 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, uint 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; Lazy_string_time str(&l_time3); @@ -2590,12 +2581,7 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, uint fuzzy_date) goto null_date; *ltime= l_time3; - check_time_range(ltime, decimals, &was_cut); - - if (was_cut) - make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, - &str, MYSQL_TIMESTAMP_TIME, NullS); - return (null_value= 0); + return (null_value= adjust_time_range_with_warn(ltime, decimals)); null_date: return (null_value= 1); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 191e6663ff1..0bfdac2f531 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -2582,6 +2582,7 @@ check_date(const MYSQL_TIME *ltime, ulonglong flags, int *was_cut) } bool check_date_with_warn(const MYSQL_TIME *ltime, uint fuzzy_date, timestamp_type ts_type); +bool adjust_time_range_with_warn(MYSQL_TIME *ltime, uint dec); int test_if_number(char *str,int *res,bool allow_wildcards); void change_byte(uchar *,uint,char,char); bool init_read_record(READ_RECORD *info, THD *thd, TABLE *reg_form, diff --git a/sql/time.cc b/sql/time.cc index dc724e21a16..4dce2f4135a 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -229,6 +229,20 @@ check_date_with_warn(const MYSQL_TIME *ltime, uint fuzzy_date, } +bool +adjust_time_range_with_warn(MYSQL_TIME *ltime, uint dec) +{ + MYSQL_TIME copy= *ltime; + Lazy_string_time str(©); + int warnings= 0; + if (check_time_range(ltime, dec, &warnings)) + return true; + if (warnings) + make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + &str, MYSQL_TIMESTAMP_TIME, NullS); + return false; +} + /* Convert a timestamp string to a MYSQL_TIME value and produce a warning if string was truncated during conversion. From ebaac51c2f047892cdfc0e30415a4880df9de2e8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 27 Jan 2014 12:10:53 +0100 Subject: [PATCH 137/163] mtr: check that tests clean up debug_sync. fix tests that didn't. --- mysql-test/include/mtr_check.sql | 3 +++ mysql-test/r/myisam_optimize.result | 1 + mysql-test/r/processlist.result | 1 + mysql-test/r/quick_select_4161.result | 1 + mysql-test/suite/rpl/r/rpl_mdev359.result | 1 + .../suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result | 1 + mysql-test/suite/rpl/r/rpl_stop_slave.result | 2 +- mysql-test/suite/rpl/t/rpl_mdev359.test | 1 + mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test | 1 + mysql-test/suite/rpl/t/rpl_stop_slave.test | 2 +- mysql-test/t/myisam_optimize.test | 1 + mysql-test/t/processlist.test | 2 +- mysql-test/t/quick_select_4161.test | 1 + storage/tokudb/mysql-test/tokudb_mariadb/r/optimize.result | 1 + storage/tokudb/mysql-test/tokudb_mariadb/t/optimize.test | 1 + 15 files changed, 17 insertions(+), 3 deletions(-) diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index 7cca74d52f0..e0d4f407633 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -78,6 +78,9 @@ 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'; + show status like 'slave_open_temp_tables'; END|| diff --git a/mysql-test/r/myisam_optimize.result b/mysql-test/r/myisam_optimize.result index 185d49e6391..341c3e180b8 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/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/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/suite/rpl/r/rpl_mdev359.result b/mysql-test/suite/rpl/r/rpl_mdev359.result index f4382f672e4..f0709a8158f 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev359.result +++ b/mysql-test/suite/rpl/r/rpl_mdev359.result @@ -9,5 +9,6 @@ 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"; UNINSTALL PLUGIN rpl_semi_sync_master; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result b/mysql-test/suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result index f69a323f980..033027addf9 100644 --- a/mysql-test/suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result +++ b/mysql-test/suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result @@ -28,4 +28,5 @@ SET DEBUG_SYNC='now SIGNAL go'; # connection: slave # cleanup SET @@GLOBAL.slave_net_timeout = @save_slave_net_timeout; +SET DEBUG_SYNC='RESET'; include/rpl_end.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/t/rpl_mdev359.test b/mysql-test/suite/rpl/t/rpl_mdev359.test index ef4e41f5291..e657474129e 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev359.test +++ b/mysql-test/suite/rpl/t/rpl_mdev359.test @@ -28,6 +28,7 @@ SET DEBUG_SYNC= "now SIGNAL m1_cont"; connection master; DROP TABLE t1; +SET DEBUG_SYNC= "RESET"; disable_warnings; UNINSTALL PLUGIN rpl_semi_sync_master; diff --git a/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test b/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test index 3eaff761108..96a629484f2 100644 --- a/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test +++ b/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test @@ -53,5 +53,6 @@ disconnect slave2; connection slave; --echo # cleanup SET @@GLOBAL.slave_net_timeout = @save_slave_net_timeout; +SET DEBUG_SYNC='RESET'; 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/t/myisam_optimize.test b/mysql-test/t/myisam_optimize.test index da47a7a4127..3788534e2a5 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/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/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/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/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'; From b4dd13b519e1346d81641ccd3331181ab13e1d41 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 27 Jan 2014 12:11:04 +0100 Subject: [PATCH 138/163] MDEV-5405 RQG induced crash in mi_assign_to_key_cache in safe mutex unlock if two threads were calling mi_assign_to_key_cache() for the same table, one could change share->key_cache while the other was having share->key_cache->op_lock locked. The other thread would crash then, trying to unlock share->key_cache->op_lock (because it would be a different mutex). fixed by caching the value of share->key_cache in a local variable. The thread can still call flush_key_blocks() for an unassigned keycache, but it's harmless. --- mysql-test/r/assign_key_cache-5405.result | 14 ++++++++++++ mysql-test/t/assign_key_cache-5405.test | 27 +++++++++++++++++++++++ storage/myisam/mi_keycache.c | 23 ++++++++++--------- 3 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 mysql-test/r/assign_key_cache-5405.result create mode 100644 mysql-test/t/assign_key_cache-5405.test 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/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/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); From 4a3ea302211ec42e7bf8558c461caa1f0c94094b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 27 Jan 2014 16:58:26 +0100 Subject: [PATCH 139/163] MDEV-4787 Missing dependency to "patch" for the Debian/Ubuntu "mariadb-test" package add patch as a "suggested" dependency to mariadb-test-5.5 --- debian/dist/Debian/control | 1 + debian/dist/Ubuntu/control | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index 2b4c419ea8e..fb8153dc87f 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -171,6 +171,7 @@ Depends: mariadb-server-5.5 (= ${source:Version}), mariadb-client-5.5 (= ${sourc Conflicts: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3, mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) +Suggests: patch Replaces: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3 Description: MariaDB database regression test suite diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index a4e25565944..0cc065a8f35 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -162,6 +162,7 @@ Package: mariadb-test-5.5 Section: database Architecture: any Depends: mariadb-server-5.5 (= ${source:Version}), mariadb-client-5.5 (= ${source:Version}) +Suggests: patch Conflicts: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3, mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) From 4bf002d6a02943bc94d918216d5dc86f2f00a0de Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 27 Jan 2014 20:50:32 +0100 Subject: [PATCH 140/163] MDEV-5576 ALTER TABLE progress report > 100% --- sql/sql_show.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 20b2b9cc7b8..acd67f807ca 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2247,6 +2247,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; From e1e5ce0da242c30a744f496dfc5b5a00584d0e56 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 28 Jan 2014 11:12:43 +0400 Subject: [PATCH 141/163] MDEV-5345 - Deadlock between mysql_change_user(), SHOW VARIABLES and INSTALL PLUGIN There was mixed lock order between LOCK_plugin, LOCK_global_system_variables and LOCK_system_variables_hash. This patch ensures that write-lock on LOCK_system_variables_hash doesn't intersect with LOCK_plugin. Fixed by moving initialization/deinitialization of plugin options from plugin_add()/plugin_del() to plugin_initialize()/plugin_deinitalize(). So that plugin options are handled without protection of LOCK_plugin. --- mysql-test/r/plugin_vars.result | 22 +++++ mysql-test/t/plugin_vars.test | 56 ++++++++++++ sql/set_var.cc | 4 +- sql/sql_plugin.cc | 149 +++++++++++++++----------------- 4 files changed, 152 insertions(+), 79 deletions(-) create mode 100644 mysql-test/r/plugin_vars.result create mode 100644 mysql-test/t/plugin_vars.test 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/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/sql/set_var.cc b/sql/set_var.cc index 2179f50d266..d4ca335e959 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -441,10 +441,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; } diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index af4c458fbef..1ada66e01fb 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -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; @@ -201,7 +202,7 @@ static bool initialized= 0; 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; @@ -297,8 +298,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 *, @@ -1038,8 +1039,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; @@ -1102,15 +1102,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); - restore_pluginvar_names(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; @@ -1196,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); + + restore_pluginvar_names(plugin->system_vars); } static void plugin_del(struct st_plugin_int *plugin) @@ -1203,10 +1199,6 @@ 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_pluginvar_names(plugin->system_vars); plugin_vars_free_values(plugin->system_vars); my_hash_delete(&plugin_hash[plugin->plugin->type], (uchar*)plugin); if (plugin->plugin_dl) @@ -1342,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"); @@ -1352,6 +1345,18 @@ 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_type_initialize[plugin->plugin->type]) { if ((*plugin_type_initialize[plugin->plugin->type])(plugin)) @@ -1413,6 +1418,9 @@ static int plugin_initialize(struct st_plugin_int *plugin) ret= 0; err: + if (ret) + restore_pluginvar_names(plugin->system_vars); + mysql_mutex_lock(&LOCK_plugin); plugin->state= state; @@ -1508,6 +1516,7 @@ int plugin_init(int *argc, char **argv, int flags) #endif init_alloc_root(&plugin_mem_root, 4096, 4096); + init_alloc_root(&plugin_vars_mem_root, 4096, 4096); init_alloc_root(&tmp_root, 4096, 4096); if (my_hash_init(&bookmark_hash, &my_charset_bin, 16, 0, 0, @@ -1575,10 +1584,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; @@ -1593,15 +1599,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; } /* @@ -1627,14 +1630,11 @@ int plugin_init(int *argc, char **argv, int flags) if (!(flags & PLUGIN_INIT_SKIP_DYNAMIC_LOADING)) { if (opt_plugin_load) - plugin_load_list(&tmp_root, argc, argv, opt_plugin_load); + plugin_load_list(&tmp_root, opt_plugin_load); 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 */ @@ -1646,9 +1646,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; @@ -1675,7 +1676,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); @@ -1714,7 +1714,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) { THD thd; TABLE_LIST tables; @@ -1786,7 +1786,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)); @@ -1807,8 +1807,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; @@ -1843,14 +1842,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); @@ -2008,6 +2007,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; @@ -2019,28 +2019,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, MYSQL_ERROR::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."); @@ -2048,6 +2042,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, MYSQL_ERROR::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 @@ -2097,6 +2098,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. @@ -2123,23 +2130,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); @@ -2147,22 +2143,20 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, for (plugin= plugin_dl->plugins; plugin->info; plugin++) { LEX_STRING str= { const_cast(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); } @@ -2817,7 +2811,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); @@ -2876,6 +2870,7 @@ static st_bookmark *register_var(const char *plugin, const char *name, static void restore_pluginvar_names(sys_var *first) { + mysql_del_sys_var_chain(first); for (sys_var *var= first; var; var= var->next) { sys_var_pluginvar *pv= var->cast_pluginvar(); @@ -3806,7 +3801,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; From f189ed5009cfd4149aa90ba18bfc9c80de9f0a39 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 28 Jan 2014 12:25:29 +0400 Subject: [PATCH 142/163] MDEV-5506 safe_mutex: Trying to lock unitialized mutex at safemalloc.c on server shutdown after SELECT with CONVERT_TZ It's wrong to return my_empty_string from val_str(). Removing my_empty_string. Using make_empty_result() instead. --- mysql-test/r/date_formats.result | 2 ++ mysql-test/r/timezone2.result | 6 ++++++ mysql-test/t/date_formats.test | 2 ++ mysql-test/t/timezone2.test | 6 ++++++ sql/item_strfunc.cc | 7 +------ sql/mysql_priv.h | 1 - sql/set_var.cc | 10 ++++------ sql/sql_class.cc | 3 ++- 8 files changed, 23 insertions(+), 14 deletions(-) diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 88255a06adb..c1519b769f5 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -24,6 +24,8 @@ SET date_format='%Y%m%d'; SET date_format='%Y.%m.%d'; SET date_format='%d.%m.%Y'; SET date_format='%m-%d-%Y'; +SET datetime_format= NULL; +ERROR 42000: Variable 'datetime_format' can't be set to the value of '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/r/timezone2.result b/mysql-test/r/timezone2.result index 70f5ef9edc1..0ac4ddca277 100644 --- a/mysql-test/r/timezone2.result +++ b/mysql-test/r/timezone2.result @@ -326,5 +326,11 @@ NULL Warnings: Warning 1292 Incorrect datetime value: '00:00:00' # +# 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 +# # End of 5.3 tests # diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index 55e08e420b1..81cd125d750 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -32,6 +32,8 @@ SET date_format='%Y.%m.%d'; 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/timezone2.test b/mysql-test/t/timezone2.test index 7764b39bf33..2d61c7631f2 100644 --- a/mysql-test/t/timezone2.test +++ b/mysql-test/t/timezone2.test @@ -297,6 +297,12 @@ DROP TABLE t1; 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'); +--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 --echo # diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index a21dd9cc02a..497739f112a 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -40,11 +40,6 @@ C_MODE_START #include "../mysys/my_static.h" // For soundex_map C_MODE_END -/** - @todo Remove this. It is not safe to use a shared String object. - */ -String my_empty_string("",default_charset_info); - /* Convert an array of bytes to a hexadecimal representation. @@ -2250,7 +2245,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)) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 0bfdac2f531..ace62e9c640 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -2357,7 +2357,6 @@ extern pthread_attr_t connection_attrib; extern I_List threads; extern I_List key_caches; extern MY_BITMAP temp_pool; -extern String my_empty_string; extern const String my_null_string; extern SHOW_VAR status_vars[]; #endif /* MYSQL_SERVER */ diff --git a/sql/set_var.cc b/sql/set_var.cc index 94a1b6a1cef..44e54ab4eb1 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -2196,13 +2196,11 @@ bool sys_var_thd_date_time_format::check(THD *thd, set_var *var) String str(buff,sizeof(buff) - 1, system_charset_info), *res; DATE_TIME_FORMAT *format; - if (!(res=var->value->val_str(&str))) - res= &my_empty_string; - - if (!(format= date_time_format_make(date_time_type, - res->ptr(), res->length()))) + if (!(res= var->value->val_str(&str)) || + !(format= date_time_format_make(date_time_type, + res->ptr(), res->length()))) { - my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, res->c_ptr()); + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, res ? res->c_ptr() : "NULL"); return 1; } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 5b0d0470370..48d32a13a1b 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1923,12 +1923,13 @@ 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); sql_exchange::sql_exchange(char *name,bool flag) :file_name(name), opt_enclosed(0), dumpfile(flag), skip_lines(0) { field_term= &default_field_term; - enclosed= line_start= &my_empty_string; + enclosed= line_start= &default_enclosed_and_line_start; line_term= &default_line_term; escaped= &default_escaped; cs= NULL; From 16e0cae0ccaf1e744d29c55cc96b8d9a53e589c0 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 28 Jan 2014 10:21:47 +0100 Subject: [PATCH 143/163] fixed a client-side overflow in mysql cli --- client/mysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 385266d7c11..db4557d10bc 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1171,7 +1171,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)); From 74d29b0ed32aa78b593fb9328843698bb84f577f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 28 Jan 2014 19:44:19 +0100 Subject: [PATCH 144/163] MDEV-5493 ha_sphinx.so is not included into Ubuntu deb packages (included into Debian) --- debian/dist/Ubuntu/mariadb-server-10.0.files.in | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.files.in b/debian/dist/Ubuntu/mariadb-server-10.0.files.in index a5d25598aa2..564d5721fc7 100644 --- a/debian/dist/Ubuntu/mariadb-server-10.0.files.in +++ b/debian/dist/Ubuntu/mariadb-server-10.0.files.in @@ -1,6 +1,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/handlersocket.so usr/lib/mysql/plugin/locales.so From 03b428d2cdf50cb97e607c55649035265f6c3c71 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 28 Jan 2014 21:01:21 +0100 Subject: [PATCH 145/163] MDEV-5520 Connection lost on wrong CREATE ROLE --- mysql-test/suite/roles/create_and_drop_role.result | 2 ++ mysql-test/suite/roles/create_and_drop_role.test | 9 ++++++++- sql/sql_acl.cc | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/roles/create_and_drop_role.result b/mysql-test/suite/roles/create_and_drop_role.result index d4eac2756ec..7a5d6818e92 100644 --- a/mysql-test/suite/roles/create_and_drop_role.result +++ b/mysql-test/suite/roles/create_and_drop_role.result @@ -34,3 +34,5 @@ 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 ``. diff --git a/mysql-test/suite/roles/create_and_drop_role.test b/mysql-test/suite/roles/create_and_drop_role.test index 3491986e666..6a329e5de96 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,11 @@ 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 ''; + diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 460e600da13..8b30c885784 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -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); From 92eafe1ab1777b40c90ff73b91a9656da947b740 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 28 Jan 2014 21:02:17 +0100 Subject: [PATCH 146/163] MDEV-5521 SET ROLE as prepared statement crashes the server set_role::light_check() was incorrect --- mysql-test/suite/roles/ps.result | 1 + mysql-test/suite/roles/ps.test | 4 ++++ sql/set_var.cc | 6 ++---- sql/set_var.h | 7 ++++--- 4 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 mysql-test/suite/roles/ps.result create mode 100644 mysql-test/suite/roles/ps.test 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/sql/set_var.cc b/sql/set_var.cc index 8ae29e01a20..4d218bcc35b 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -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 11501c4212a..318bc04e16e 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -278,11 +278,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); }; From 5a385146ae39f71fa5139429992eb64a7d9ec9ed Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 28 Jan 2014 21:11:56 +0100 Subject: [PATCH 147/163] MDEV-5523 Server crashes on DROP USER use 'user_name' for the error message (fixed, after get_current_user()), not the original tmp_user_name, as it comes from the parser (host == NULL). --- mysql-test/suite/roles/create_and_drop_role.result | 4 ++++ mysql-test/suite/roles/create_and_drop_role.test | 8 ++++++++ sql/sql_acl.cc | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/roles/create_and_drop_role.result b/mysql-test/suite/roles/create_and_drop_role.result index 7a5d6818e92..c36de3bc3d3 100644 --- a/mysql-test/suite/roles/create_and_drop_role.result +++ b/mysql-test/suite/roles/create_and_drop_role.result @@ -36,3 +36,7 @@ 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; diff --git a/mysql-test/suite/roles/create_and_drop_role.test b/mysql-test/suite/roles/create_and_drop_role.test index 6a329e5de96..b130c530b08 100644 --- a/mysql-test/suite/roles/create_and_drop_role.test +++ b/mysql-test/suite/roles/create_and_drop_role.test @@ -52,3 +52,11 @@ connection default; --error ER_INVALID_ROLE create role ''; +# +# MDEV-5523 Server crashes on DROP USER +# +create role r1; +--error ER_CANNOT_USER +drop user r1; +drop role r1; + diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 8b30c885784..0e5767c0da7 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -9271,7 +9271,7 @@ bool mysql_drop_user(THD *thd, List &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; } From 416148a4cf2d0c1796659c405fcaf421d6abe555 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 29 Jan 2014 00:05:24 +0100 Subject: [PATCH 148/163] MDEV-5526 Assertion `proxied_user->host.length' fails on GRANT PROXY ON recognize the context better: always treat the barename as a username in the username context --- .../suite/roles/create_and_drop_role.result | 2 +- .../suite/roles/grant_proxy-5526.result | 9 +++++++ mysql-test/suite/roles/grant_proxy-5526.test | 10 +++++++ mysql-test/suite/roles/password.result | 10 +++---- mysql-test/suite/roles/password.test | 12 +++++---- sql/sql_acl.cc | 26 +++++++++---------- sql/sql_yacc.yy | 14 +++++++--- 7 files changed, 55 insertions(+), 28 deletions(-) create mode 100644 mysql-test/suite/roles/grant_proxy-5526.result create mode 100644 mysql-test/suite/roles/grant_proxy-5526.test diff --git a/mysql-test/suite/roles/create_and_drop_role.result b/mysql-test/suite/roles/create_and_drop_role.result index c36de3bc3d3..4a5fd3ee429 100644 --- a/mysql-test/suite/roles/create_and_drop_role.result +++ b/mysql-test/suite/roles/create_and_drop_role.result @@ -38,5 +38,5 @@ create role ''; ERROR OP000: Invalid role specification ``. create role r1; drop user r1; -ERROR HY000: Operation DROP USER failed for 'r1' +ERROR HY000: Operation DROP USER failed for 'r1'@'%' drop role r1; 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..8f5f8cf6843 --- /dev/null +++ b/mysql-test/suite/roles/grant_proxy-5526.test @@ -0,0 +1,10 @@ +# +# MDEV-5526 Assertion `proxied_user->host.length' fails on GRANT PROXY ON +# +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/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/sql/sql_acl.cc b/sql/sql_acl.cc index 0e5767c0da7..4abf447549d 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -8351,7 +8351,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; @@ -8574,7 +8574,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; @@ -8734,11 +8733,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 { @@ -8858,14 +8856,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); @@ -9349,20 +9347,20 @@ bool mysql_rename_user(THD *thd, List &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 diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 7514b7bec63..e13687530ee 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1771,7 +1771,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type keyword keyword_sp %type user grant_user grant_role user_or_role current_role - admin_option_for_role + admin_option_for_role user_maybe_role %type opt_collate @@ -13916,7 +13916,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 +13974,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: From dba4e82a845ace666f62410c92be65a6b98ab88e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 29 Jan 2014 11:00:06 +0100 Subject: [PATCH 149/163] MDEV-5525 Assertion `status == 0' fails on creating user after granting it role admin option don't add entries to acl_roles_mappings hash for non-existing grantees. --- .../suite/roles/create_and_drop_role.result | 6 ++ .../suite/roles/create_and_drop_role.test | 8 ++ sql/sql_acl.cc | 74 +++++++++++++------ 3 files changed, 67 insertions(+), 21 deletions(-) diff --git a/mysql-test/suite/roles/create_and_drop_role.result b/mysql-test/suite/roles/create_and_drop_role.result index 4a5fd3ee429..2974dd20e22 100644 --- a/mysql-test/suite/roles/create_and_drop_role.result +++ b/mysql-test/suite/roles/create_and_drop_role.result @@ -40,3 +40,9 @@ 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 b130c530b08..38f040789e0 100644 --- a/mysql-test/suite/roles/create_and_drop_role.test +++ b/mysql-test/suite/roles/create_and_drop_role.test @@ -60,3 +60,11 @@ create role r1; 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/sql/sql_acl.cc b/sql/sql_acl.cc index 4abf447549d..c35794f476c 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3388,7 +3388,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 @@ -3436,20 +3436,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]))) { @@ -3469,14 +3459,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); @@ -3487,6 +3469,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) { @@ -6051,6 +6075,8 @@ bool mysql_grant_role(THD *thd, List &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 @@ -9205,6 +9231,10 @@ bool mysql_create_user(THD *thd, List &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); } } @@ -9591,6 +9621,8 @@ bool mysql_revoke_all(THD *thd, List &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 From a9c22c188886bf88f7ff557cecfa1ceb2ed75e12 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 29 Jan 2014 16:10:53 +0100 Subject: [PATCH 150/163] MDEV-5295 deb upgrade 5.5 to 10.0.6 does not work Use Breaks: not Conflicts: --- debian/dist/Debian/control | 16 ++++++++-------- debian/dist/Ubuntu/control | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index 236e5540c0d..bcade084b07 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -14,7 +14,7 @@ Package: libmariadbclient18 Section: libs Architecture: any Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: mariadb-server-10.0 (<< 10.0.5), mariadb-galera-server-10.0 (<< 10.0.5), +Breaks: mariadb-server-10.0 (<< 10.0.5), mariadb-galera-server-10.0 (<< 10.0.5), mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3 Description: MariaDB database client library @@ -45,7 +45,7 @@ Architecture: any Section: libdevel Depends: libmariadbclient-dev (>= ${source:Version}), ${misc:Depends} Provides: libmysqld-dev -Conflicts: libmysqld-dev +Breaks: libmysqld-dev Replaces: libmysqld-dev Description: MariaDB embedded database development files MariaDB is a fast, stable and true multi-user, multi-threaded SQL database @@ -60,7 +60,7 @@ Architecture: any Section: libdevel Depends: libmariadbclient18 (>= ${source:Version}), zlib1g-dev, , ${shlibs:Depends}, ${misc:Depends} Replaces: libmariadbclient16-dev, libmysqlclient16-dev -Conflicts: libmysqlclient-dev, libmariadbclient16-dev, libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev, libmysqlclient15-dev, libmysqlclient16-dev +Breaks: libmysqlclient-dev, libmariadbclient16-dev, libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev, libmysqlclient15-dev, libmysqlclient16-dev Provides: libmysqlclient-dev Description: MariaDB database development files MariaDB is a fast, stable and true multi-user, multi-threaded SQL database @@ -100,7 +100,7 @@ Package: mariadb-client-core-10.0 Architecture: any Depends: mariadb-common, libmariadbclient18 (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} Provides: mysql-client-core, mysql-client-core-5.1, mysql-client-core-5.5 -Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, +Breaks: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1 (<< ${source:Version}), mysql-client-5.5 (<< ${source:Version}), mysql-client-core-5.1, mysql-client-core-5.5, mariadb-client-5.1, mariadb-client-core-5.1, @@ -125,7 +125,7 @@ Architecture: any Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mariadb-common, libmariadbclient18 (>= ${source:Version}), mariadb-client-core-10.0 (>= ${source:Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends} Provides: virtual-mysql-client, mysql-client, mysql-client-4.1, mysql-client-5.1, mysql-client-5.5 -Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, +Breaks: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, mariadb-client (<< ${source:Version}), mariadb-client-5.1, mariadb-client-5.2, mariadb-client-5.3, mysql-client-5.5 Replaces: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, @@ -145,7 +145,7 @@ Package: mariadb-server-core-10.0 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version}) Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5 -Conflicts: mariadb-server-5.1 (<< 5.1.60), +Breaks: mariadb-server-5.1 (<< 5.1.60), mariadb-server-5.2 (<< 5.2.10), mariadb-server-5.3 (<< 5.3.3), mysql-server-5.0, @@ -169,7 +169,7 @@ Package: mariadb-test-10.0 Section: database Architecture: any Depends: mariadb-server-10.0 (= ${source:Version}), mariadb-client-10.0 (= ${source:Version}) -Conflicts: mariadb-test (<< ${source:Version}), +Breaks: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3, mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) Replaces: mariadb-test (<< ${source:Version}), @@ -189,7 +189,7 @@ 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), mariadb-server-core-10.0 (>= ${binary:Version}) Provides: mariadb-server, mysql-server, virtual-mysql-server -Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), +Breaks: mariadb-server (<< ${source:Version}), mysql-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-tokudb-engine-5.5, mariadb-tokudb-engine-10.0 diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index 410e992429c..d8b5abfb8a7 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -14,7 +14,7 @@ Package: libmariadbclient18 Section: libs Architecture: any Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: mariadb-server-10.0 (<< 10.0.5), mariadb-galera-server-10.0 (<< 10.0.5), +Breaks: mariadb-server-10.0 (<< 10.0.5), mariadb-galera-server-10.0 (<< 10.0.5), mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33), mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3 Description: MariaDB database client library @@ -45,7 +45,7 @@ Architecture: any Section: libdevel Depends: libmariadbclient-dev (>= ${source:Version}), ${misc:Depends} Provides: libmysqld-dev -Conflicts: libmysqld-dev +Breaks: libmysqld-dev Replaces: libmysqld-dev Description: MariaDB embedded database development files MariaDB is a fast, stable and true multi-user, multi-threaded SQL database @@ -60,7 +60,7 @@ Architecture: any Section: libdevel Depends: libmariadbclient18 (>= ${source:Version}), zlib1g-dev, , ${shlibs:Depends}, ${misc:Depends} Replaces: libmariadbclient16-dev, libmysqlclient16-dev -Conflicts: libmysqlclient-dev, libmariadbclient16-dev, libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev, libmysqlclient15-dev, libmysqlclient16-dev +Breaks: libmysqlclient-dev, libmariadbclient16-dev, libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev, libmysqlclient15-dev, libmysqlclient16-dev Provides: libmysqlclient-dev Description: MariaDB database development files MariaDB is a fast, stable and true multi-user, multi-threaded SQL database @@ -100,7 +100,7 @@ Package: mariadb-client-core-10.0 Architecture: any Depends: mariadb-common, libmariadbclient18 (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} Provides: mysql-client-core, mysql-client-core-5.1, mysql-client-core-5.5 -Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, +Breaks: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1 (<< ${source:Version}), mysql-client-5.5 (<< ${source:Version}), mysql-client-core-5.1, mysql-client-core-5.5, mariadb-client-5.1, mariadb-client-core-5.1, @@ -125,7 +125,7 @@ Architecture: any Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mariadb-common, libmariadbclient18 (>= ${source:Version}), mariadb-client-core-10.0 (>= ${source:Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends} Provides: virtual-mysql-client, mysql-client, mysql-client-4.1, mysql-client-5.1, mysql-client-5.5 -Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, +Breaks: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, mariadb-client (<< ${source:Version}), mariadb-client-5.1, mariadb-client-5.2, mariadb-client-5.3, mysql-client-5.5 Replaces: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, @@ -145,7 +145,7 @@ Package: mariadb-server-core-10.0 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version}) Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5 -Conflicts: mysql-server-5.0, +Breaks: mysql-server-5.0, 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 Replaces: mysql-server-5.0, @@ -163,7 +163,7 @@ Package: mariadb-test-10.0 Section: database Architecture: any Depends: mariadb-server-10.0 (= ${source:Version}), mariadb-client-10.0 (= ${source:Version}) -Conflicts: mariadb-test (<< ${source:Version}), +Breaks: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3, mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) Replaces: mariadb-test (<< ${source:Version}), @@ -183,7 +183,7 @@ 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), mariadb-server-core-10.0 (>= ${binary:Version}) Provides: mariadb-server, mysql-server, virtual-mysql-server -Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), +Breaks: mariadb-server (<< ${source:Version}), mysql-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-tokudb-engine-5.5, mariadb-tokudb-engine-10.0 From ce02738d7f2f2688eeec7004dd6a30293d36044f Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 31 Jan 2014 13:52:29 +0400 Subject: [PATCH 151/163] Adding a new command into CMakeLists.txt: SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) to find header files from the bundled libraries (jemalloc, yassl, readline, pcre, etc) before the ones installed in the system. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfa63cb8c92..e431f3e027b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,6 +260,11 @@ 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) From 2acc01b3cfa27074f93016b893cda20fa0a3497f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 1 Feb 2014 00:54:28 +0100 Subject: [PATCH 152/163] make sequence and sql_discovery suites default too --- storage/sequence/mysql-test/sequence/suite.pm | 7 +++++++ .../test_sql_discovery/mysql-test/sql_discovery/suite.pm | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 storage/sequence/mysql-test/sequence/suite.pm create mode 100644 storage/test_sql_discovery/mysql-test/sql_discovery/suite.pm diff --git a/storage/sequence/mysql-test/sequence/suite.pm b/storage/sequence/mysql-test/sequence/suite.pm new file mode 100644 index 00000000000..3964415db73 --- /dev/null +++ b/storage/sequence/mysql-test/sequence/suite.pm @@ -0,0 +1,7 @@ +package My::Suite::Sequence; +@ISA = qw(My::Suite); + +sub is_default { 1 } + +bless { }; + diff --git a/storage/test_sql_discovery/mysql-test/sql_discovery/suite.pm b/storage/test_sql_discovery/mysql-test/sql_discovery/suite.pm new file mode 100644 index 00000000000..22f22514b3a --- /dev/null +++ b/storage/test_sql_discovery/mysql-test/sql_discovery/suite.pm @@ -0,0 +1,7 @@ +package My::Suite::SQL_Discovery; +@ISA = qw(My::Suite); + +sub is_default { 1 } + +bless { }; + From 27fbb637d36324992b270f0dc0472807ffa4ebc2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 1 Feb 2014 09:32:59 +0100 Subject: [PATCH 153/163] MDEV-5544 Custom errors (generated from storage engine) not getting returned by mariadb --- mysql-test/suite/csv/csv.result | 2 +- mysql-test/suite/federated/federated.result | 2 +- .../suite/innodb/r/innodb-create-options.result | 11 +++++++++++ mysql-test/suite/innodb/r/innodb-zip.result | 17 +++++++++++++++++ .../suite/innodb/r/innodb_bug46000.result | 2 +- .../r/partition_basic_symlink_innodb.result | 1 + sql/handler.cc | 8 +++++--- 7 files changed, 37 insertions(+), 6 deletions(-) diff --git a/mysql-test/suite/csv/csv.result b/mysql-test/suite/csv/csv.result index 5ac79a23c47..fc6aab530c7 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"; 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/innodb/r/innodb-create-options.result b/mysql-test/suite/innodb/r/innodb-create-options.result index a3dcaee3a10..fe3d799229d 100644 --- a/mysql-test/suite/innodb/r/innodb-create-options.result +++ b/mysql-test/suite/innodb/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/r/innodb-zip.result index 4c55cccb28a..dbfae3c0630 100644 --- a/mysql-test/suite/innodb/r/innodb-zip.result +++ b/mysql-test/suite/innodb/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_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/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/sql/handler.cc b/sql/handler.cc index ae337f4a153..0088d6010a5 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4597,14 +4597,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); From 27d45e46968e4bd623565688a997b83b0a5cc1a8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 1 Feb 2014 09:33:26 +0100 Subject: [PATCH 154/163] MDEV-5574 Set AUTO_INCREMENT below max value of column. Update InnoDB to 5.6.14 Apply MySQL-5.6 hack for MySQL Bug#16434374 Move Aria-only HA_RTREE_INDEX from my_base.h to maria_def.h (breaks an assert in InnoDB) Fix InnoDB memory leak --- include/my_base.h | 4 +- mysql-test/r/alter_table_autoinc-5574.result | 11 + mysql-test/suite/innodb/r/innodb.result | 4 - mysql-test/suite/innodb/t/innodb.test | 10 - mysql-test/suite/innodb_fts/r/fulltext.result | 17 +- .../innodb_fts/r/fulltext_left_join.result | 6 +- .../suite/innodb_fts/r/fulltext_misc.result | 2 +- .../suite/innodb_fts/r/innodb_fts_misc.result | 3 +- .../innodb_fts/r/innodb_fts_plugin.result | 29 + .../r/innodb_fts_result_cache_limit.result | 31 + .../r/innodb_fts_stopword_charset.result | 321 ++ mysql-test/suite/innodb_fts/t/fulltext.test | 20 +- .../innodb_fts/t/fulltext_left_join.test | 2 + .../suite/innodb_fts/t/fulltext_misc.test | 2 +- .../suite/innodb_fts/t/fulltext_order_by.test | 2 +- .../suite/innodb_fts/t/innodb_fts_misc.test | 6 +- .../suite/innodb_fts/t/innodb_fts_plugin.test | 45 + .../t/innodb_fts_result_cache_limit.test | 51 + .../t/innodb_fts_stopword_charset.test | 421 +++ mysql-test/t/alter_table_autoinc-5574.test | 12 + sql/item_func.cc | 8 +- sql/item_func.h | 35 + storage/innobase/api/api0api.cc | 139 +- storage/innobase/btr/btr0btr.cc | 488 ++- storage/innobase/btr/btr0cur.cc | 595 +-- storage/innobase/btr/btr0pcur.cc | 4 +- storage/innobase/buf/buf0buddy.cc | 456 ++- storage/innobase/buf/buf0buf.cc | 54 +- storage/innobase/buf/buf0dblwr.cc | 206 +- storage/innobase/buf/buf0flu.cc | 306 +- storage/innobase/buf/buf0lru.cc | 264 +- storage/innobase/buf/buf0rea.cc | 35 +- storage/innobase/compile-innodb | 2 +- storage/innobase/dict/dict0boot.cc | 1 - storage/innobase/dict/dict0crea.cc | 87 +- storage/innobase/dict/dict0dict.cc | 387 +- storage/innobase/dict/dict0load.cc | 148 +- storage/innobase/dict/dict0mem.cc | 6 +- storage/innobase/dict/dict0stats.cc | 166 +- storage/innobase/dict/dict0stats_bg.cc | 63 +- storage/innobase/dyn/dyn0dyn.cc | 4 +- storage/innobase/fil/fil0fil.cc | 448 ++- storage/innobase/fsp/fsp0fsp.cc | 7 +- storage/innobase/fts/fts0ast.cc | 232 +- storage/innobase/fts/fts0blex.cc | 30 +- storage/innobase/fts/fts0config.cc | 6 +- storage/innobase/fts/fts0fts.cc | 312 +- storage/innobase/fts/fts0opt.cc | 67 +- storage/innobase/fts/fts0pars.cc | 638 ++-- storage/innobase/fts/fts0pars.y | 6 +- storage/innobase/fts/fts0que.cc | 1039 ++++-- storage/innobase/fts/fts0tlex.cc | 81 +- storage/innobase/fts/fts0tlex.l | 2 +- storage/innobase/handler/ha_innodb.cc | 593 ++- storage/innobase/handler/ha_innodb.h | 8 +- storage/innobase/handler/handler0alter.cc | 3190 ++++++++++------- storage/innobase/handler/i_s.cc | 215 +- storage/innobase/handler/i_s.h | 3 +- storage/innobase/ibuf/ibuf0ibuf.cc | 142 +- storage/innobase/include/api0api.h | 4 +- storage/innobase/include/btr0btr.h | 50 +- storage/innobase/include/btr0cur.h | 111 +- storage/innobase/include/buf0buf.h | 42 +- storage/innobase/include/buf0buf.ic | 22 +- storage/innobase/include/buf0dblwr.h | 50 +- storage/innobase/include/buf0flu.h | 27 +- storage/innobase/include/buf0lru.h | 14 +- storage/innobase/include/buf0rea.h | 4 +- storage/innobase/include/buf0types.h | 4 +- storage/innobase/include/db0err.h | 3 + storage/innobase/include/dict0crea.h | 34 +- storage/innobase/include/dict0crea.ic | 75 +- storage/innobase/include/dict0dict.h | 60 +- storage/innobase/include/dict0load.h | 36 +- storage/innobase/include/dict0mem.h | 8 +- storage/innobase/include/dict0priv.h | 6 +- storage/innobase/include/dict0priv.ic | 8 +- storage/innobase/include/dict0stats.ic | 22 +- storage/innobase/include/dict0stats_bg.h | 59 +- storage/innobase/include/dict0stats_bg.ic | 45 + storage/innobase/include/dict0types.h | 17 +- storage/innobase/include/dyn0dyn.h | 80 +- storage/innobase/include/dyn0dyn.ic | 137 +- storage/innobase/include/fil0fil.h | 17 +- storage/innobase/include/fts0ast.h | 14 +- storage/innobase/include/fts0blex.h | 6 +- storage/innobase/include/fts0fts.h | 52 +- storage/innobase/include/fts0pars.h | 26 +- storage/innobase/include/fts0tlex.h | 6 +- storage/innobase/include/fts0types.h | 6 +- storage/innobase/include/fts0types.ic | 3 +- storage/innobase/include/ha_prototypes.h | 37 +- storage/innobase/include/handler0alter.h | 2 +- storage/innobase/include/ibuf0ibuf.h | 6 +- storage/innobase/include/ibuf0ibuf.ic | 20 +- storage/innobase/include/lock0lock.h | 23 +- storage/innobase/include/log0log.h | 4 +- storage/innobase/include/mach0data.ic | 2 + storage/innobase/include/mtr0mtr.h | 15 +- storage/innobase/include/os0file.h | 78 +- storage/innobase/include/os0file.ic | 60 + storage/innobase/include/page0cur.h | 37 +- storage/innobase/include/page0cur.ic | 22 +- storage/innobase/include/page0page.h | 78 +- storage/innobase/include/page0page.ic | 34 +- storage/innobase/include/page0types.h | 6 +- storage/innobase/include/page0zip.h | 10 +- storage/innobase/include/page0zip.ic | 30 +- storage/innobase/include/rem0rec.ic | 14 +- storage/innobase/include/row0log.h | 31 +- storage/innobase/include/row0merge.h | 10 +- storage/innobase/include/srv0mon.h | 5 +- storage/innobase/include/srv0start.h | 9 - storage/innobase/include/trx0rec.h | 4 +- storage/innobase/include/trx0trx.h | 21 +- storage/innobase/include/trx0types.h | 5 +- storage/innobase/include/trx0undo.h | 3 +- storage/innobase/include/univ.i | 20 +- storage/innobase/include/ut0dbg.h | 42 - storage/innobase/include/ut0rbt.h | 2 +- storage/innobase/lock/lock0lock.cc | 262 +- storage/innobase/lock/lock0wait.cc | 29 +- storage/innobase/log/log0log.cc | 30 +- storage/innobase/log/log0recv.cc | 129 +- storage/innobase/mem/mem0mem.cc | 6 +- storage/innobase/mtr/mtr0mtr.cc | 145 +- storage/innobase/os/os0file.cc | 41 +- storage/innobase/page/page0cur.cc | 281 +- storage/innobase/page/page0page.cc | 125 +- storage/innobase/page/page0zip.cc | 117 +- storage/innobase/pars/pars0pars.cc | 6 +- storage/innobase/read/read0read.cc | 4 +- storage/innobase/rem/rem0rec.cc | 9 +- storage/innobase/row/row0ext.cc | 32 +- storage/innobase/row/row0ftsort.cc | 4 +- storage/innobase/row/row0import.cc | 6 +- storage/innobase/row/row0ins.cc | 58 +- storage/innobase/row/row0log.cc | 553 ++- storage/innobase/row/row0merge.cc | 383 +- storage/innobase/row/row0mysql.cc | 82 +- storage/innobase/row/row0purge.cc | 104 +- storage/innobase/row/row0quiesce.cc | 11 +- storage/innobase/row/row0sel.cc | 12 +- storage/innobase/row/row0uins.cc | 28 +- storage/innobase/row/row0umod.cc | 48 +- storage/innobase/row/row0upd.cc | 4 + storage/innobase/srv/srv0mon.cc | 8 +- storage/innobase/srv/srv0srv.cc | 46 +- storage/innobase/srv/srv0start.cc | 134 +- storage/innobase/sync/sync0arr.cc | 12 +- storage/innobase/trx/trx0purge.cc | 4 +- storage/innobase/trx/trx0roll.cc | 25 +- storage/innobase/trx/trx0sys.cc | 2 +- storage/innobase/trx/trx0trx.cc | 330 +- storage/innobase/trx/trx0undo.cc | 14 +- storage/innobase/ut/ut0crc32.cc | 2 +- storage/innobase/ut/ut0dbg.cc | 32 - storage/innobase/ut/ut0ut.cc | 4 + storage/maria/maria_def.h | 7 + storage/xtradb/handler/ha_innodb.cc | 3 + 160 files changed, 10378 insertions(+), 5904 deletions(-) create mode 100644 mysql-test/r/alter_table_autoinc-5574.result create mode 100644 mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result create mode 100644 mysql-test/suite/innodb_fts/r/innodb_fts_result_cache_limit.result create mode 100644 mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result create mode 100644 mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test create mode 100644 mysql-test/suite/innodb_fts/t/innodb_fts_result_cache_limit.test create mode 100644 mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test create mode 100644 mysql-test/t/alter_table_autoinc-5574.test create mode 100644 storage/innobase/include/dict0stats_bg.ic diff --git a/include/my_base.h b/include/my_base.h index c9f9a8a4ed3..2880b52e6e2 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -264,13 +264,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. 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/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/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index e2056d66855..157e2480740 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -1244,16 +1244,6 @@ insert into t1 values ('1111', '3333'); 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_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/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/sql/item_func.cc b/sql/item_func.cc index f9f467f44f3..8858837188d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -6214,6 +6214,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++) { @@ -6225,7 +6226,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 @@ -6234,7 +6238,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; @@ -6332,7 +6336,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; diff --git a/sql/item_func.h b/sql/item_func.h index 4b1516dcc4d..270c031955a 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1909,6 +1909,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/storage/innobase/api/api0api.cc b/storage/innobase/api/api0api.cc index 5f9762a1846..647ebcde6f0 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; @@ -1183,7 +1183,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. */ @@ -1630,6 +1630,8 @@ ib_cursor_insert_row( src_tuple->index->table, q_proc->grph.ins, node->ins); } + srv_active_wake_master_thread(); + return(err); } @@ -1914,6 +1916,8 @@ ib_cursor_update_row( err = ib_execute_update_query_graph(cursor, pcur); } + srv_active_wake_master_thread(); + return(err); } @@ -2039,6 +2043,8 @@ ib_cursor_delete_row( err = DB_RECORD_NOT_FOUND; } + srv_active_wake_master_thread(); + return(err); } @@ -2296,12 +2302,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 +2320,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 +2334,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 +2351,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,23 +2396,97 @@ 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: - memcpy(dst, src, len); + 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 +2559,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 +2569,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 +3537,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 +3552,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 +3567,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 +3582,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 +3597,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 +3612,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 +3627,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 +3642,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 +3657,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 +3690,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 +3741,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); } diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc index e3e127c3ace..63b01f65f4b 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); @@ -1811,6 +1814,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 +1834,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 +1903,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 +1924,92 @@ 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); + } + } +#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 +2027,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 +2039,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 +2082,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 +2130,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 +2178,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 +2866,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 +2996,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 +3038,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 +3120,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 +3137,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 +3550,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 +3558,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); @@ -3490,10 +3576,13 @@ btr_compress( 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 +3593,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,65 +3601,33 @@ 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); - } - - mem_heap_free(heap); - return(FALSE); - } - - /* 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))) { + DBUG_EXECUTE_IF("ib_always_merge_right", is_left = FALSE;); + if(!is_left + && !btr_can_merge_with_page(cursor, right_page_no, &merge_block, + mtr)) { goto err_exit; } - ut_ad(page_validate(merge_page, index)); + merge_page = buf_block_get_frame(merge_block); - 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; - } +#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)); merge_page_zip = buf_block_get_page_zip(merge_block); #ifdef UNIV_ZIP_DEBUG @@ -3629,11 +3663,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 +3696,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 +3709,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 +3726,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); } @@ -3753,8 +3806,19 @@ func_exit: page_rec_get_nth(merge_block->frame, nth_rec), merge_block, cursor); } + DBUG_RETURN(TRUE); - 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 +3880,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); } } @@ -4489,9 +4552,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 +4862,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..bbc189d1d39 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 (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); + 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); + } + 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); } @@ -1827,61 +1825,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 +1886,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 +1920,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 +1948,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 +1966,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 +1982,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 +2024,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 +2037,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 +2057,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 +2072,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 +2080,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 +2110,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 +2184,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 +2227,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 +2244,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 +2274,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 +2374,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 +2389,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 +2398,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 +2410,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 +2446,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 +2456,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 +2466,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 +2534,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 +2596,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 +2620,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 +2710,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 +2859,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 +2911,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 +3014,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 +3161,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 +3241,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 +3264,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 +3368,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 +4326,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 +4410,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 +4561,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 +4806,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 +4909,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 +4936,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 +4966,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 +5021,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..54ef2a243ba 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 @@ -126,7 +126,7 @@ btr_pcur_store_position( || 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 */ 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]); + buf = UT_LIST_GET_FIRST(buf_pool->zip_free[i]); - if (bpage) { - ut_a(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE); - - 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->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( + reinterpret_cast(buf) + offs); + buf_buddy_add_to_free(buf_pool, zip_buf, j); } + buf_buddy_stamp_nonfree(reinterpret_cast(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(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); + buddy = reinterpret_cast( + buf_buddy_get(reinterpret_cast(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); + 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; + + 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? */ + if (buf_buddy_free_t* zip_buf = + UT_LIST_GET_FIRST(buf_pool->zip_free[i])) { + + /* 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); + + /* Try to relocate the buddy of buf to the free + block. */ + if (buf_buddy_relocate(buf_pool, buddy, zip_buf, i)) { + + goto buddy_is_free; + } + + buf_buddy_add_to_free(buf_pool, zip_buf, i); } - 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)); - - /* The buddy is not free. Is there a free block of this size? */ - bpage = 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 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, bpage, i)) { - - buddy->state = BUF_BLOCK_ZIP_FREE; - goto buddy_is_free; - } - - 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), + 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(i); + buf_flush_t type = static_cast(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( - mem_zalloc(buf_size * sizeof(ibool))); + buf_dblwr->in_use = static_cast( + mem_zalloc(buf_size * sizeof(bool))); buf_dblwr->write_buf_unaligned = static_cast( 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); - - 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) { - - mutex_exit(&buf_dblwr->mutex); - /* This will finish the batch. Sync data files - to the disk. */ - fil_flush_file_spaces(FIL_TABLESPACE); + switch (flush_type) { + case BUF_FLUSH_LIST: + case BUF_FLUSH_LRU: mutex_enter(&buf_dblwr->mutex); - /* We can now reuse the doublewrite memory buffer: */ - buf_dblwr->first_free = 0; - buf_dblwr->batch_running = FALSE; - } + ut_ad(buf_dblwr->batch_running); + ut_ad(buf_dblwr->b_reserved > 0); + ut_ad(buf_dblwr->b_reserved <= buf_dblwr->first_free); - mutex_exit(&buf_dblwr->mutex); + 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); + 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; + } + } + + /* 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; + } } /********************************************************************//** @@ -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 */ @@ -826,28 +872,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 @@ -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. */ + /* 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); - buf_flush_list_mutex_enter(buf_pool); + /* 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) { - /* 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); - - if (bpage) { - ut_a(bpage->oldest_modification > 0); - } - - 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); + prev = UT_LIST_GET_PREV(list, bpage); + buf_flush_set_hp(buf_pool, prev); + buf_flush_list_mutex_exit(buf_pool); - /* 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)) { +#ifdef UNIV_DEBUG + bool flushed = +#endif /* UNIV_DEBUG */ + buf_flush_page_and_try_neighbors( + bpage, BUF_FLUSH_LIST, min_n, &count); - ++scanned; - buf_flush_list_mutex_enter(buf_pool); + 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; - } - - bpage = UT_LIST_GET_PREV(list, bpage); - - ut_ad(!bpage || bpage->in_flush_list); - - 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)) { - total_flushed += n_flushed; + /* Allowed only one batch per + buffer pool instance. */ + buf_flush_wait_batch_end( + buf_pool, BUF_FLUSH_LRU); + } + + 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) { - - mutex_exit(block_mutex); - - /* We cannot remove this page yet; - maybe the system is currently reading - it in, or flushing the modifications - to the file */ - - } else if (!flush) { - - buf_flush_remove(bpage); - - mutex_exit(block_mutex); - - processed = true; - - } else if (buf_page_get_io_fix(bpage) != BUF_IO_NONE) { - - /* 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. */ - - /* The following call will release the buffer pool - and block mutex. */ - buf_flush_page(buf_pool, 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(); - - buf_pool_mutex_enter(buf_pool); - - processed = true; - } else { - mutex_exit(block_mutex); - } - - buf_flush_list_mutex_enter(buf_pool); } + ib_mutex_t* block_mutex = buf_page_get_mutex(bpage); + bool processed = false; + + /* 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. */ + + buf_flush_list_mutex_exit(buf_pool); + + mutex_enter(block_mutex); + + ut_ad(bpage->oldest_modification != 0); + + if (!flush) { + + buf_flush_remove(bpage); + + mutex_exit(block_mutex); + + processed = true; + + } else if (buf_flush_ready_for_flush(bpage, + BUF_FLUSH_SINGLE_PAGE)) { + + /* 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)); + + /* Wake possible simulated aio thread to actually + post the writes to the operating system */ + os_aio_simulated_wake_handler_threads(); + + buf_pool_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 --- 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..c7cb3aa21bb 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 @@ -891,11 +892,15 @@ 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 { + 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 +1458,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 +1475,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 +1504,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 +1524,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 +1548,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(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 +1581,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 +1637,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 a560dc54eac..1a1697b2ffc 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; - /* This is a >= 4.0.18 format id */ + /* 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); + } + } + + 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( 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); } @@ -3211,9 +3303,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; @@ -3246,14 +3345,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" @@ -3278,9 +3378,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, @@ -3288,7 +3388,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" @@ -3350,14 +3451,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; @@ -3772,6 +3886,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(mem_alloc(sql_length + 1)); @@ -3786,16 +3905,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; @@ -4164,10 +4296,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); @@ -4439,7 +4574,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); @@ -5635,38 +5770,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; } @@ -5676,25 +5815,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); } /**********************************************************************//** @@ -6118,7 +6260,7 @@ dict_close(void) } } -# ifdef UNIV_DEBUG +#ifdef UNIV_DEBUG /**********************************************************************//** Validate the dictionary table LRU list. @return TRUE if valid */ @@ -6203,7 +6345,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 @@ -6213,67 +6355,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); + } - if (dict_index_get_n_fields(index) < n_cols) { - return(false); - } + for (ulint i = 0; i < n_cols; i++) { + dict_field_t* field; + const char* col_name; + ulint col_no; - for (i= 0; i < n_cols; i++) { - dict_field_t* field; - const char* col_name; + field = dict_index_get_nth_field(index, i); + col_no = dict_col_get_no(field->col); - field = dict_index_get_nth_field(index, i); + if (field->prefix_len != 0) { + /* We do not accept column prefix + indexes here */ + return(false); + } - col_name = dict_table_get_col_name( - table, dict_col_get_no(field->col)); + if (check_null + && (field->col->prtype & DATA_NOT_NULL)) { + return(false); + } - if (field->prefix_len != 0) { - /* We do not accept column prefix - indexes here */ + col_name = col_names + ? col_names[col_no] + : dict_table_get_col_name(table, col_no); - break; - } + if (0 != innobase_strcasecmp(columns[i], col_name)) { + return(false); + } - if (0 != innobase_strcasecmp(columns[i], - col_name)) { - 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); + } + } - if (check_null - && (field->col->prtype & DATA_NOT_NULL)) { - - 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)) { - - break; - } - } - - return((i == n_cols) ? true : false); + return(true); } /*********************************************************************//** diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index d423a3b7304..6ffb6924402 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); @@ -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..b060a79e75a 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 */ diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index 25bcc87d93c..bfd0542b8e2 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 + /* 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 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,14 +768,12 @@ 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( @@ -826,15 +822,13 @@ dict_stats_update_transient_for_index( 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 +894,6 @@ dict_stats_update_transient( table->stat_initialized = TRUE; } -/* @} */ /* @{ Pseudo code about the relation between the following functions @@ -938,7 +931,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 +976,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 +1106,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 +1118,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 +1179,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 +1210,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 +1255,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 +1363,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 +1490,6 @@ dict_stats_analyze_index_below_cur( return(n_diff); } -/* @} */ /*********************************************************************//** For a given level in an index select N_SAMPLE_PAGES(index) @@ -1536,7 +1514,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 +1580,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 +1596,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 +1635,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 +1744,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 +1773,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 +1827,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 (mem_zalloc(n_uniq * sizeof(ib_uint64_t))); - n_diff_boundaries = reinterpret_cast - (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 +1984,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 +2079,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 +2201,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 +2368,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 +2450,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 +2475,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 +2715,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 +2838,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 +2858,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 +2881,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 +2924,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 +3027,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 +3060,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 +3128,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 +3209,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 +3228,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 +3247,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 +3266,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 +3285,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 +3306,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 +3362,6 @@ dict_stats_drop_table( return(ret); } -/* @} */ /*********************************************************************//** Executes @@ -3411,7 +3369,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 +3384,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 +3408,6 @@ dict_stats_rename_in_table_stats( return(ret); } -/* @} */ /*********************************************************************//** Executes @@ -3459,7 +3415,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 +3430,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 +3454,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 +3477,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 +3611,6 @@ dict_stats_rename_table( return(ret); } -/* @} */ /* tests @{ */ #ifdef UNIV_COMPILE_TEST_FUNCS @@ -4050,5 +4002,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 /** 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) { @@ -1929,11 +1965,64 @@ fil_write_flushed_lsn_to_data_files( return(DB_SUCCESS); } +/*******************************************************************//** +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(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;; - /* We want to flush the changes at least up to - old_mod_counter */ - old_mod_counter = node->modification_counter; + if (old_mod_counter <= node->flush_counter) { + continue; + } - if (space->purpose == FIL_TABLESPACE) { - fil_n_pending_tablespace_flushes++; - } else { - fil_n_pending_log_flushes++; - fil_n_log_flushes++; - } + ut_a(node->open); + + 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); - - os_thread_sleep(20000); - - mutex_enter(&fil_system->mutex); - - if (node->flush_counter >= old_mod_counter) { - - goto skip_flush; - } - - goto retry; - } - - ut_a(node->open); - file = node->handle; - node->n_pending_flushes++; + ib_int64_t sig_count = + os_event_reset(node->sync_event); mutex_exit(&fil_system->mutex); - /* fprintf(stderr, "Flushing to file %s\n", - node->name); */ - - os_file_flush(file); + os_event_wait_low(node->sync_event, sig_count); mutex_enter(&fil_system->mutex); - node->n_pending_flushes--; -skip_flush: - if (node->flush_counter < old_mod_counter) { - node->flush_counter = old_mod_counter; + if (node->flush_counter >= old_mod_counter) { - if (space->is_in_unflushed_spaces - && fil_space_is_flushed(space)) { - - space->is_in_unflushed_spaces = false; - - UT_LIST_REMOVE( - unflushed_spaces, - fil_system->unflushed_spaces, - space); - } + goto skip_flush; } - if (space->purpose == FIL_TABLESPACE) { - fil_n_pending_tablespace_flushes--; - } else { - fil_n_pending_log_flushes--; + goto retry; + } + + ut_a(node->open); + file = node->handle; + node->n_pending_flushes++; + + mutex_exit(&fil_system->mutex); + + os_file_flush(file); + + mutex_enter(&fil_system->mutex); + + os_event_set(node->sync_event); + + node->n_pending_flushes--; +skip_flush: + if (node->flush_counter < old_mod_counter) { + node->flush_counter = old_mod_counter; + + if (space->is_in_unflushed_spaces + && fil_space_is_flushed(space)) { + + space->is_in_unflushed_spaces = false; + + 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(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; - node->type = FTS_AST_TERM; + /* Scan the incoming string and filter out any "non-word" characters */ + while (cur_pos < len) { + fts_string_t str; + ulint offset; + ulint cur_len; - node->term.ptr = static_cast(ut_malloc(len + 1)); - memcpy(node->term.ptr, ptr, len + 1); + cur_len = innobase_mysql_fts_get_token( + state->charset, + reinterpret_cast(ptr) + cur_pos, + reinterpret_cast(ptr) + len, &str, &offset); - fts_ast_state_add_node((fts_ast_state_t*) arg, node); + if (cur_len == 0) { + break; + } - return(node); + cur_pos += cur_len; + + 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; + } + + node = fts_ast_node_create(); + + node->type = FTS_AST_TERM; + + node->term.ptr = static_cast(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(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( + 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; } - } else if (node->type == FTS_AST_SUBEXP_LIST) { + + break; + + case FTS_AST_SUBEXP_LIST: + if (visit_pass != FTS_PASS_FIRST) { + break; + } + 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..29d6771f9e7 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 @@ -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"; diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index a81d3043e9c..9b06497c8ae 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; @@ -146,74 +157,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 +234,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 +357,13 @@ fts_load_default_stopword( allocator = stopword_info->heap; heap = static_cast(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 +477,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 +655,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( mem_heap_zalloc(heap, sizeof(fts_sync_t))); @@ -649,10 +668,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; @@ -922,6 +939,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) { @@ -1199,7 +1218,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(cache->sync_heap->arg)); @@ -1500,6 +1522,112 @@ fts_drop_table( return(error); } +/****************************************************************//** +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( + 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 @@ -1586,13 +1714,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 +1731,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 +1750,7 @@ fts_drop_index_tables( mem_free(table_name); } +#endif /* FTS_DOC_STATS_DEBUG */ return(error); } @@ -1884,7 +2016,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 +2027,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 +2039,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; @@ -2501,12 +2636,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 +2692,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" "" @@ -2841,7 +2978,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 +3541,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 +3635,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 +3854,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 +3899,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 +4080,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 (;;) { @@ -4303,6 +4446,10 @@ fts_sync( } } + DBUG_EXECUTE_IF("fts_instrument_sync_interrupted", + sync->interrupted = true; + ); + if (error == DB_SUCCESS && !sync->interrupted) { error = fts_sync_commit(sync); } else { @@ -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(mach_read_from_8(data)); + if (my_heap && !heap) { + mem_heap_free(my_heap); + } + return(doc_id); } @@ -5794,7 +5945,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 +5995,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 +6147,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 +6169,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 +6181,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(col->prtype & DATA_MYSQL_TYPE_MASK), + static_cast(dtype_get_charset_coll(col->prtype)))); } /**********************************************************************//** @@ -6109,7 +6266,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 +6323,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 +6491,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 +6528,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( ib_vector_get(cache->get_docs, i)); @@ -6384,13 +6549,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..0fd577c5767 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,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; +/** 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" */ @@ -242,22 +245,22 @@ static const char* fts_init_delete_sql = "BEGIN\n" "\n" "INSERT INTO %s_BEING_DELETED\n" - "SELECT doc_id FROM %s_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"; + "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. */ @@ -500,7 +503,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 +827,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 +987,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 +1460,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); @@ -2813,6 +2816,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( + 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 +2973,10 @@ fts_optimize_thread( /* Timeout ? */ if (msg == NULL) { + if (fts_is_sync_needed(tables)) { + fts_need_sync = true; + } + continue; } @@ -3055,6 +3099,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 . */ @@ -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 /* 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 /* 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 /* 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) +/* 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. + + 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) { - int yyn = yypact[yystate]; + 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; - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + 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; + 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; -# 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; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - 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; + 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; + } + } } + + 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_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + 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..72901d193eb 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 +#include +#include + #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 word_map_t; +typedef std::vector 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 */ @@ -429,22 +446,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(p2); - - return(strcmp(static_cast(p1), - *(static_cast (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. @@ -536,6 +537,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( + 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(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( + 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. @@ -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; + 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; - } - } - - 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; + } - ranking->rank = rank; + /* Take words */ + new_ranking.words = ranking->words; + new_ranking.words_len = ranking->words_len; + } - if (ranking->words != NULL - && rbt_search(query->intersection, &parent, - ranking) != 0) { - rbt_add_node(query->intersection, &parent, - ranking); + new_ranking.rank = rank; + new_ranking.doc_id = doc_id; + 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(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( @@ -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( @@ -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( @@ -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( @@ -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( @@ -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( @@ -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(phrase->f_str) + cur_pos, + reinterpret_cast(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( ib_vector_push(tokens, NULL)); - token->f_str = (byte*) strtok_r( - src, FTS_PHRASE_DELIMITER, &state); + token->f_str = static_cast( + mem_heap_alloc(heap, result_str.f_len + 1)); + ut_memcpy(token->f_str, result_str.f_str, result_str.f_len); - if (token->f_str) { + token->f_len = result_str.f_len; + token->f_str[token->f_len] = 0; + + 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( + 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(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,112 @@ 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(ut_malloc(str_len)); + + *result_len = innobase_fts_casedn_str( + charset, const_cast(reinterpret_cast( + query_str)), query_len, + reinterpret_cast(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) { + 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( + str_ptr + cur_pos); + + if (*last_op == '-' || *last_op == '+') { + *last_op = ' '; + } + } + + cur_pos += cur_len; + } + + return(str_ptr); +} /*******************************************************************//** FTS Query entry point. @@ -3382,9 +3794,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 +3812,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 +3828,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 +3838,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 +3882,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 +3897,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 +3930,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 +3962,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 +4049,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 +4111,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 +4121,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 +4143,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 +4163,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 +4192,7 @@ fts_expand_query( } } +func_exit: fts_doc_free(&result_doc); return(error); @@ -3857,8 +4310,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 ee7ea4246f9..b5abc89601d 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. @@ -154,8 +154,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: */ @@ -396,7 +394,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 */ @@ -413,7 +411,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 */ @@ -453,10 +451,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, @@ -511,6 +517,15 @@ innodb_stopword_table_validate( system clustered index when there is no primary key. */ const char innobase_index_reserve_name[] = "GEN_CLUST_INDEX"; +/******************************************************************//** +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 */ + /******************************************************************//** Maps a MySQL trx isolation level code to the InnoDB isolation level code @return InnoDB isolation level */ @@ -1506,7 +1521,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: @@ -1519,6 +1535,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); } } @@ -1611,6 +1629,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 @@ -1754,9 +1797,14 @@ innobase_mysql_tmpfile(void) /*========================*/ { 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 @@ -2124,13 +2172,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; @@ -2160,13 +2208,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; @@ -2229,6 +2277,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); @@ -2240,6 +2292,7 @@ ha_innobase::update_thd( } user_thd = thd; + DBUG_VOID_RETURN; } /*********************************************************************//** @@ -2479,21 +2532,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; @@ -2751,7 +2801,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 }; @@ -2922,14 +2973,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) { @@ -3134,8 +3204,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, @@ -3366,6 +3434,9 @@ innobase_end( mysql_mutex_destroy(&pending_checkpoint_mutex); } + my_free(fts_server_stopword_table); + fts_server_stopword_table= NULL; + DBUG_RETURN(err); } @@ -4902,17 +4973,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 */ + 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]; + 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"); @@ -4942,20 +5013,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) @@ -4981,7 +5054,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 @@ -5021,14 +5094,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 " @@ -5054,9 +5123,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, @@ -5299,8 +5367,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; @@ -5680,8 +5746,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, @@ -5689,64 +5755,56 @@ 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; - do { - for (;;) { + for (;;) { - if (doc >= end) { - return(doc - start); - } - - int ctype; - - mbl = cs->cset->ctype( - cs, &ctype, (uchar*) doc, (uchar*) end); - - if (true_word_char(ctype, *doc)) { - break; - } - - doc += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); + if (doc >= end) { + return(doc - start); } - ulint mwc = 0; - ulint length = 0; + int ctype; - token->f_str = doc; + mbl = cs->cset->ctype( + cs, &ctype, doc, (const uchar*) end); - while (doc < end) { - - int ctype; - - 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; - } - - ++length; - - doc += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); + if (true_word_char(ctype, *doc)) { + break; } - token->f_len = (uint) (doc - token->f_str) - mwc; - token->f_n_char = length; + doc += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); + } - return(doc - start); + ulint mwc = 0; + ulint length = 0; - } while (doc < end); + token->f_str = const_cast(doc); - token->f_str[token->f_len] = 0; + while (doc < end) { + + int ctype; + + 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; + } + + ++length; + + doc += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); + } + + token->f_len = (uint) (doc - token->f_str) - mwc; + token->f_n_char = length; return(doc - start); } @@ -7476,6 +7534,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 @@ -8310,7 +8374,7 @@ ha_innobase::ft_init_ext( { trx_t* trx; dict_table_t* table; - ulint error; + dberr_t error; byte* query = (byte*) key->ptr(); ulint query_len = key->length(); const CHARSET_INFO* char_set = key->charset(); @@ -8387,24 +8451,25 @@ ha_innobase::ft_init_ext( 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)); - - 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; - - /* FIXME: Re-evluate the condition when Bug 14469540 - is resolved */ - prebuilt->in_fts_query = true; + my_error(convert_error_code_to_mysql(error, 0, NULL), + MYF(0)); + return(NULL); } + /* Allocate FTS handler, and instantiate it before return */ + fts_hdl = static_cast(my_malloc(sizeof(NEW_FT_INFO), + MYF(0))); + + 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); } @@ -8922,6 +8987,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( @@ -9515,6 +9583,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; } @@ -9837,7 +9910,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: @@ -9893,6 +9966,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) { @@ -9931,15 +10014,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); @@ -10407,8 +10481,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); @@ -10446,6 +10522,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); } @@ -11054,8 +11131,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 { @@ -11602,14 +11677,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); + 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)) { @@ -11625,15 +11701,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); + 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"); } } @@ -12301,11 +12380,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) { my_error(ER_BINLOG_STMT_MODE_AND_ROW_ENGINE, MYF(0), " InnoDB is limited to row-logging when " @@ -12323,14 +12401,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; @@ -13051,7 +13138,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)) { @@ -15165,6 +15254,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(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. @@ -15241,29 +15404,6 @@ innodb_reset_all_monitor_update( TRUE); } -/****************************************************************//** -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(save)); - page_compression_level = - (static_cast(innobase_compression_level)); -} - /****************************************************************//** Parse and enable InnoDB monitor counters during server startup. User can list the monitor counters/groups to be enable by specifying @@ -15441,6 +15581,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 @@ -15487,6 +15628,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 */ /*********************************************************************** @@ -15725,6 +15893,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, @@ -15744,7 +15917,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 */ @@ -15952,12 +16125,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, @@ -16009,6 +16190,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", @@ -16074,6 +16262,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", @@ -16082,7 +16280,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, @@ -16153,10 +16351,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, @@ -16432,6 +16632,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), @@ -16466,6 +16669,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), @@ -16484,6 +16689,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), @@ -16548,6 +16754,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), @@ -16600,7 +16807,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, @@ -17056,6 +17262,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() */ diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 1fb071f5765..97f26f93225 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -633,8 +633,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. @@ -645,5 +645,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 a120534b36d..8cfd6928376 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 @@ -49,16 +49,17 @@ Smart ALTER TABLE #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 @@ -70,9 +71,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 @@ -81,15 +82,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)) @@ -162,16 +166,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); } } @@ -199,7 +203,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 @@ -249,7 +253,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)) @@ -307,29 +314,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 @@ -423,7 +407,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, @@ -456,7 +440,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 */ @@ -500,7 +484,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 @@ -571,6 +555,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; @@ -587,22 +573,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, + this is needed only if user supplies the constraint name */ - /* Check if any existing foreign key has the same id */ + 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( @@ -647,16 +632,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 @@ -770,63 +758,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; + dict_index_t* index; - index = dict_table_get_first_index(table); + 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; - } + 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( /*==========================*/ @@ -835,15 +817,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; @@ -854,203 +838,205 @@ innobase_get_foreign_key_info( List_iterator 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(key); + fk_key = static_cast(key); - if (fk_key->columns.elements > 0) { - Key_part_spec* column; - List_iterator key_part_iterator( - fk_key->columns); + if (fk_key->columns.elements > 0) { + ulint i = 0; + Key_part_spec* column; + List_iterator 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++; - } + /* 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); + 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;); + /* 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; + } + + 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; +#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]; + } +#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); + + goto err_exit; + } + + if (fk_key->ref_columns.elements > 0) { + ulint i = 0; + Key_part_spec* column; + List_iterator 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++; + } + + if (referenced_table) { + referenced_index = + dict_foreign_find_index( + referenced_table, 0, + referenced_column_names, + i, index, + 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 (!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; - } - - 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; -#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]; - } -#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); - - goto err_exit; - } - - i = 0; - - if (fk_key->ref_columns.elements > 0) { - Key_part_spec* column; - List_iterator 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++; - } - - 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; - } - - 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)) { + 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); } - mutex_exit(&dict_sys->mutex); - - correct_option = innobase_set_foreign_key_option( - add_fk[num_fk], fk_key); - - DBUG_EXECUTE_IF("innodb_test_wrong_fk_option", - correct_option = false;); - - 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++; - i = 0; + 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; + } + + mutex_exit(&dict_sys->mutex); + + correct_option = innobase_set_foreign_key_option( + add_fk[num_fk], fk_key); + + DBUG_EXECUTE_IF("innodb_test_wrong_fk_option", + correct_option = false;); + + 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]); } @@ -1651,7 +1637,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)) { @@ -2004,16 +1990,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 */ @@ -2028,21 +2016,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, @@ -2051,36 +2044,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() @@ -2088,6 +2083,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&); @@ -2523,27 +2522,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( + 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 @@ -2555,92 +2586,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_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); - trx_start_if_not_started_xa(user_trx); + user_table = ctx->new_table; + + 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; } @@ -2654,34 +2676,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( + mem_heap_alloc(ctx->heap, ctx->num_to_add_index + * sizeof *ctx->add_index)); + ctx->add_key_numbers = add_key_nums = static_cast( + 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 @@ -2690,24 +2714,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; } @@ -2725,7 +2753,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), @@ -2734,12 +2762,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); } @@ -2778,7 +2809,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; @@ -2808,14 +2840,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), @@ -2823,14 +2855,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; @@ -2842,13 +2875,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), @@ -2861,64 +2894,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 @@ -2928,22 +2966,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; @@ -2952,39 +2990,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) { @@ -2997,18 +3037,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; @@ -3018,34 +3058,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); @@ -3053,15 +3097,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 @@ -3075,16 +3119,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)"); @@ -3098,32 +3132,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. */ @@ -3134,7 +3169,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; @@ -3143,17 +3178,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)); @@ -3161,18 +3196,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(); @@ -3183,7 +3219,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( /*=============================*/ @@ -3193,6 +3229,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 */ @@ -3201,8 +3239,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); @@ -3211,7 +3247,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, @@ -3239,7 +3275,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, @@ -3285,6 +3321,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; @@ -3298,10 +3335,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); @@ -3323,12 +3357,6 @@ ha_innobase::prepare_inplace_alter_table( goto func_exit; } - 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( @@ -3392,7 +3420,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; @@ -3483,12 +3511,27 @@ check_if_ok_to_rename: n_drop_index = 0; 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( mem_heap_alloc( heap, @@ -3535,7 +3578,6 @@ found_fk: == ha_alter_info->alter_info->drop_list.elements); } else { drop_fk = NULL; - heap = NULL; } if (ha_alter_info->index_drop_count) { @@ -3546,9 +3588,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( mem_heap_alloc( heap, (ha_alter_info->index_drop_count + 1) @@ -3582,8 +3621,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 @@ -3601,7 +3640,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 @@ -3620,12 +3659,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); @@ -3640,7 +3690,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)); @@ -3648,16 +3699,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; @@ -3669,10 +3710,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( mem_heap_zalloc( heap, @@ -3680,8 +3717,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); @@ -3700,21 +3739,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: @@ -3728,7 +3772,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( @@ -3816,16 +3860,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)); } @@ -3851,10 +3904,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)); @@ -3863,7 +3913,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); @@ -3881,6 +3931,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)) { @@ -3894,16 +3945,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); @@ -4005,27 +4055,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); } } @@ -4037,17 +4089,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; @@ -4066,65 +4118,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( @@ -4135,13 +4188,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 @@ -4149,8 +4204,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; @@ -4166,21 +4221,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); @@ -4201,7 +4256,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); @@ -4211,20 +4266,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 @@ -4233,11 +4286,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, @@ -4246,10 +4299,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 @@ -4262,7 +4314,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); @@ -4284,7 +4336,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); @@ -4292,7 +4344,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)) { @@ -4337,8 +4390,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++) { @@ -4370,8 +4423,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++) { @@ -4404,37 +4457,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 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; @@ -4443,11 +4494,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; @@ -4462,33 +4513,758 @@ 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; + } - if (ctx->add_fk[i]->referenced_table) { - UT_LIST_REMOVE( - referenced_list, - ctx->add_fk[i]->referenced_table - ->referenced_list, - ctx->add_fk[i]); + List_iterator_fast 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; } + + 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; } } +/** 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, + ha_innobase_inplace_ctx*ctx, + const TABLE* altered_table, + const TABLE* old_table) +{ + ulonglong max_autoinc; + + 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->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. */ + max_autoinc = ctx->sequence.last(); + } else if ((ha_alter_info->handler_flags + & Alter_inplace_info::CHANGE_CREATE_OPTION) + && (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 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(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); + } + + DBUG_RETURN(max_autoinc); +} + +/** 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; + + 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(ER_TOO_LONG_IDENT, MYF(0), + fk->id); + DBUG_RETURN(true); + } + + 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); + } + } + + 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); + } + } + + DBUG_RETURN(false); +} + +/** 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; + + /* 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 { + /* 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)); +} + +/** 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); + } + } + + if (innobase_update_foreign_try(ctx, trx, table_name)) { + DBUG_RETURN(true); + } + + dberr_t error; + + /* 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; + } + + /* 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->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); + } + } + + 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); + } + + 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; + } + + /* 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. */ + + error = row_merge_rename_tables_dict( + user_table, rebuilt_table, ctx->tmp_name, trx); + + /* We must be still holding a table handle. */ + DBUG_ASSERT(user_table->n_ref_count >= 1); + + DBUG_EXECUTE_IF("ib_ddl_crash_after_rename", DBUG_SUICIDE();); + DBUG_EXECUTE_IF("ib_rebuild_cannot_rename", error = DB_ERROR;); + + 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. */ + + /* 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. */ + + error = DB_LOCK_WAIT_TIMEOUT; + } + + 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); + } +} + +/** 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; + + 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)); + + const char* old_name = mem_heap_strdup( + ctx->heap, ctx->old_table->name); + + /* 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); + + error = dict_table_rename_in_cache( + ctx->new_table, old_name, FALSE); + ut_a(error == DB_SUCCESS); + + DBUG_VOID_RETURN; +} + +/** 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 (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(). */ + + 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) { + 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); + } + } + + if (!(ha_alter_info->handler_flags + & Alter_inplace_info::ALTER_COLUMN_NAME)) { + DBUG_RETURN(false); + } + + DBUG_RETURN(innobase_rename_columns_try(ha_alter_info, ctx, + old_table, trx, table_name)); +} + +/** 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"); + + 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 (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. */ + + 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); + + /* 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)); + } + + trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); + row_merge_drop_indexes_dict(trx, ctx->new_table->id); + + 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); + + 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); + } + + dict_index_remove_from_cache(index->table, index); + } + + trx_commit_for_mysql(trx); + } + + 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; + } + + char errstr[1024]; + + 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); + } + } + + 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); + + if (!(index->type & DICT_FTS)) { + dict_stats_init(ctx->new_table); + dict_stats_update_for_index(index); + } + } + + DBUG_VOID_RETURN; +} + +/** 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"); + + if (dict_table_is_discarded(table) + || !dict_stats_is_persistent_enabled(table)) { + DBUG_VOID_RETURN; + } + + dberr_t ret; + + ret = dict_stats_update(table, DICT_STATS_RECALC_PERSISTENT); + + 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)); + } + + 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 @@ -4511,19 +5287,19 @@ ha_innobase::commit_inplace_alter_table( Alter_inplace_info* ha_alter_info, bool commit) { - ha_innobase_inplace_ctx* ctx + ha_innobase_inplace_ctx* ctx0 = static_cast (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); +#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"); @@ -4535,43 +5311,49 @@ ha_innobase::commit_inplace_alter_table( 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)); - } - - 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) { - /* An AUTO_INCREMENT column was added. Get the last - value from the sequence, which may be based on a - supplied AUTO_INCREMENT value. */ - max_autoinc = ctx->sequence.last(); - } else if ((ha_alter_info->handler_flags - & Alter_inplace_info::CHANGE_CREATE_OPTION) - && (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. */ - max_autoinc = ha_alter_info->create_info->auto_increment_value; - } 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); + ha_alter_info, table, prebuilt)); } if (!(ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)) { - DBUG_ASSERT(!ctx); - /* We may want to update table attributes. */ - goto func_exit; + 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(*pctx); + + if (ctx->trx) { + trx_free_for_mysql(ctx->trx); + ctx->trx = NULL; + } } 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(*pctx); + DBUG_ASSERT(ctx->prebuilt->trx == prebuilt->trx); + /* 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 @@ -4579,757 +5361,500 @@ ha_innobase::commit_inplace_alter_table( 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); + prebuilt->trx, ctx->old_table, LOCK_X); if (error != DB_SUCCESS) { - my_error_innodb(error, table_share->table_name.str, 0); + my_error_innodb( + error, table_share->table_name.str, 0); DBUG_RETURN(true); } - - DEBUG_SYNC(user_thd, "innodb_alter_commit_after_lock_table"); } - 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); - } - } - } - } + DEBUG_SYNC(user_thd, "innodb_alter_commit_after_lock_table"); - if (!ctx || !ctx->trx) { - /* Create a background transaction for the operations on - the data dictionary tables. */ - trx = innobase_trx_allocate(user_thd); - - trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); - - new_clustered = false; - } else { - trx_dict_op_t op; - - trx = ctx->trx; - - new_clustered = ctx->indexed_table != prebuilt->table; - - op = (new_clustered) ? TRX_DICT_OP_TABLE : TRX_DICT_OP_INDEX; - - trx_start_for_ddl(trx, op); - } + const bool new_clustered = ctx0->need_rebuild(); + trx_t* trx = ctx0->trx; + bool fail = false; if (new_clustered) { - if (prebuilt->table->fts) { - ut_ad(!prebuilt->table->fts->add_wq); - fts_optimize_remove_table(prebuilt->table); - } + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast(*pctx); + DBUG_ASSERT(ctx->need_rebuild()); - if (ctx->indexed_table->fts) { - ut_ad(!ctx->indexed_table->fts->add_wq); - fts_optimize_remove_table(ctx->indexed_table); + if (ctx->old_table->fts) { + ut_ad(!ctx->old_table->fts->add_wq); + fts_optimize_remove_table( + ctx->old_table); + } + + if (ctx->new_table->fts) { + ut_ad(!ctx->new_table->fts->add_wq); + fts_optimize_remove_table( + ctx->new_table); + } } } + if (!trx) { + DBUG_ASSERT(!new_clustered); + trx = innobase_trx_allocate(user_thd); + } + + 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); - /* 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); - } + /* Prevent the background statistics collection from accessing + the tables. */ + for (;;) { + bool retry = false; - /* Final phase of add foreign key processing */ - if (ctx && ctx->num_to_add_fk > 0) { - ulint highest_id_so_far; - dberr_t error; + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast(*pctx); - /* 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); + DBUG_ASSERT(new_clustered == ctx->need_rebuild()); - trx_start_for_ddl(fk_trx, TRX_DICT_OP_INDEX); - - fk_trx->dict_operation_lock_mode = - trx->dict_operation_lock_mode; - } else { - fk_trx = trx; - } - - ut_ad(ha_alter_info->handler_flags - & Alter_inplace_info::ADD_FOREIGN_KEY); - - highest_id_so_far = dict_table_get_highest_foreign_id( - prebuilt->table); - - highest_id_so_far++; - - fk_table = ctx->indexed_table; - - for (ulint i = 0; i < ctx->num_to_add_fk; i++) { - - /* Get the new dict_table_t */ - if (new_clustered) { - ctx->add_fk[i]->foreign_table - = fk_table; + if (new_clustered + && !dict_stats_stop_bg(ctx->old_table)) { + retry = true; } - /* Add Foreign Key info to in-memory metadata */ - UT_LIST_ADD_LAST(foreign_list, - fk_table->foreign_list, - ctx->add_fk[i]); - - 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]); - } - - 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; - } - } - - /* System table change */ - error = dict_create_add_foreign_to_dictionary( - &highest_id_so_far, prebuilt->table, - ctx->add_fk[i], 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), - ctx->add_fk[i]->id); - goto undo_add_fk; + if (!dict_stats_stop_bg(ctx->new_table)) { + retry = true; } } - /* Make sure the tables are moved to non-lru side of - dictionary list */ - error = dict_load_foreigns(prebuilt->table->name, FALSE, TRUE); - - if (error != DB_SUCCESS) { - my_error(ER_CANNOT_ADD_FOREIGN, MYF(0)); - -undo_add_fk: - err = -1; - - if (new_clustered) { - goto drop_new_clustered; - } else if (ctx->num_to_add > 0) { - ut_ad(trx != fk_trx); - - innobase_rollback_sec_index( - prebuilt, table_share, trx); - innobase_undo_add_fk(ctx, fk_table); - trx_rollback_for_mysql(fk_trx); - - goto trx_commit; - } else { - goto trx_rollback; - } - } - } - - if (new_clustered) { - dberr_t error; - char* tmp_name; - - /* 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]; - DBUG_ASSERT(*index->name != TEMP_INDEX_PREFIX); - DBUG_ASSERT(index->to_be_dropped); - index->to_be_dropped = 0; - } - - /* 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->online) { - DEBUG_SYNC_C("row_log_table_apply2_before"); - error = row_log_table_apply( - ctx->thr, prebuilt->table, altered_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 (error != DB_SUCCESS) { - err = -1; - goto drop_new_clustered; - } - } - - 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();); - - /* 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; - } - - error = row_merge_rename_tables( - prebuilt->table, ctx->indexed_table, - tmp_name, trx); - - DBUG_EXECUTE_IF("ib_ddl_crash_after_rename", - DBUG_SUICIDE();); - - /* 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); - - switch (error) { - dict_table_t* old_table; - case DB_SUCCESS: - old_table = prebuilt->table; - - DBUG_EXECUTE_IF("ib_ddl_crash_before_commit", - DBUG_SUICIDE();); - - trx_commit_for_mysql(prebuilt->trx); - - DBUG_EXECUTE_IF("ib_ddl_crash_after_commit", - DBUG_SUICIDE();); - - if (fk_trx) { - ut_ad(fk_trx != trx); - trx_commit_for_mysql(fk_trx); - } - - 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; + if (!retry) { 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); - } - - dict_table_close(ctx->indexed_table, TRUE, FALSE); - -#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); - } } - /* 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(). */ - - 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); - - 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); - } - } + DICT_STATS_BG_YIELD(trx); } - 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); + /* Apply the changes to the data dictionary tables, for all + partitions. */ - if (innobase_drop_foreign( - table_share, trx, ctx->drop_fk[i])) { - err = -1; - } + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx && !fail; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast(*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 } - 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; - } + /* Commit or roll back the changes to the data dictionary. */ - 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: + if (fail) { + trx_rollback_for_mysql(trx); + } else if (!new_clustered) { trx_commit_for_mysql(trx); } else { -trx_rollback: - /* undo the addition of foreign key */ - if (fk_trx) { - innobase_undo_add_fk(ctx, fk_table); + mtr_t mtr; + mtr_start(&mtr); - if (fk_trx != trx) { - trx_rollback_for_mysql(fk_trx); - } + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast(*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++); } - trx_rollback_for_mysql(trx); + /* 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); - /* 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; + /* 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); - /* 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); - } + /* 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();); + } - if (ctx->num_to_add) { + /* 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 */ + + log_buffer_flush_to_disk(); + + /* 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; + + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast(*pctx); + + DBUG_ASSERT(ctx->need_rebuild() == new_clustered); + + if (new_clustered) { + innobase_online_rebuild_log_free(ctx->old_table); + } + + 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); - row_merge_drop_indexes(trx, prebuilt->table, - FALSE); + 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++); - for (i = 0; i < ctx->num_to_drop; i++) { - dict_index_t* index = ctx->drop[i]; - index->to_be_dropped = false; - } - } - } - - /* 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 */ - - log_buffer_flush_to_disk(); - - if (new_clustered) { - innobase_online_rebuild_log_free(prebuilt->table); - } - - if (err == 0 && ctx) { - /* The changes were successfully performed. */ - bool add_fts = false; - - /* Rebuild the index translation table. - This should only be needed when !new_clustered. */ - share->idx_trans_tbl.index_count = 0; - - /* 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 (index->type & DICT_FTS) { - DBUG_ASSERT(index->type == DICT_FTS); - fts_add_index(index, prebuilt->table); - add_fts = true; - } + continue; } - if (!new_clustered && ha_alter_info->index_drop_count) { + innobase_copy_frm_flags_from_table_share( + ctx->new_table, altered_table->s); - /* 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. */ + 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; - trx_start_for_ddl(trx, TRX_DICT_OP_INDEX); + /* Rename the tablespace files. */ + commit_cache_rebuild(ctx); - 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); - - /* Replace the indexes in foreign key - constraints if needed. */ - - dict_foreign_replace_index( - prebuilt->table, index, prebuilt->trx); - - /* 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)); + error = innobase_update_foreign_cache(ctx); + if (error != DB_SUCCESS) { + goto foreign_fail; } + } else { + error = innobase_update_foreign_cache(ctx); - row_merge_drop_indexes_dict(trx, prebuilt->table->id); - - 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 (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); } - dict_index_remove_from_cache( - prebuilt->table, index); - } - - trx_commit_for_mysql(trx); - } - - ut_d(dict_table_check_for_dup_indexes( - prebuilt->table, CHECK_ALL_COMPLETE)); - DBUG_ASSERT(new_clustered == !prebuilt->trx); - - if (add_fts) { - fts_optimize_add_table(prebuilt->table); - } - } - - 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++; - - DBUG_EXECUTE_IF("ib_ddl_crash_after_user_trx_commit", - DBUG_SUICIDE();); - - trx_start_if_not_started_xa(prebuilt->trx); - } - - 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 (ctx && trx == ctx->trx) { - ctx->trx = NULL; - } - - 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.) - - Because the data dictionary changes were already committed, - orphaned rows may be left in the statistics table if the - system crashes. */ - - 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 (ctx && !dict_table_is_discarded(prebuilt->table)) { - bool stats_init_called = false; - - for (uint i = 0; i < ctx->num_to_add; i++) { - dict_index_t* index = ctx->add[i]; - - if (!(index->type & DICT_FTS)) { - - if (!stats_init_called) { - innobase_copy_frm_flags_from_table_share( - index->table, - altered_table->s); - - dict_stats_init(index->table); - - stats_init_called = true; - } - - dict_stats_update_for_index(index); - } + innobase_rename_columns_cache( + ha_alter_info, table, + ctx->new_table); } } + DBUG_INJECT_CRASH("ib_commit_inplace_crash", + crash_inject_count++); } - trx_commit_for_mysql(prebuilt->trx); + /* 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; - /* 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 */ - - log_buffer_flush_to_disk(); + if (trx == ctx0->trx) { + ctx0->trx = NULL; + } /* Tell the InnoDB server that there might be work for utility threads: */ srv_active_wake_master_thread(); -func_exit: + if (fail) { + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast + (*pctx); + DBUG_ASSERT(ctx->need_rebuild() == new_clustered); - 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); + 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); } + /* Release the table locks. */ + trx_commit_for_mysql(prebuilt->trx); + + DBUG_EXECUTE_IF("ib_ddl_crash_after_user_trx_commit", DBUG_SUICIDE();); + + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast + (*pctx); + DBUG_ASSERT(ctx->need_rebuild() == new_clustered); + + if (altered_table->found_next_number_field) { + dict_table_t* t = ctx->new_table; + + dict_table_autoinc_lock(t); + dict_table_autoinc_initialize(t, ctx->max_autoinc); + dict_table_autoinc_unlock(t); + } + + bool add_fts = false; + + /* 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]; + + if (index->type & DICT_FTS) { + DBUG_ASSERT(index->type == DICT_FTS); + fts_add_index(index, ctx->new_table); + add_fts = true; + } + } + + ut_d(dict_table_check_for_dup_indexes( + ctx->new_table, CHECK_ALL_COMPLETE)); + + if (add_fts) { + fts_optimize_add_table(ctx->new_table); + } + + ut_d(dict_table_check_for_dup_indexes( + ctx->new_table, CHECK_ABORTED_OK)); + ut_a(fts_check_cached_index(ctx->new_table)); + + 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). */ + + char errstr[1024]; + + DBUG_ASSERT(0 == strcmp(ctx->old_table->name, + ctx->tmp_name)); + + 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); + } + + DBUG_EXECUTE_IF("ib_ddl_crash_before_commit", + DBUG_SUICIDE();); + + trx_t* const user_trx = prebuilt->trx; + + row_prebuilt_free(ctx->prebuilt, TRUE); + + /* 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); + + /* 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++); + } + + 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 (new_clustered) { + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + ha_innobase_inplace_ctx* ctx + = static_cast + (*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 + (*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); + DBUG_ASSERT(!index->to_be_dropped); } -#endif /* UNIV_DEBUG */ +#endif /* DBUG_OFF */ - 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_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, @@ -5366,6 +5891,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..cafa745129b 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 -#include // PROCESS_ACL +#include #include #include @@ -35,18 +35,19 @@ Created July 18, 2007 Vasil Dimov #include #include -#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[] = @@ -3875,14 +3747,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 +4332,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 +4746,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 +4818,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(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 +4841,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 +4913,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 +4959,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 +5459,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 +5525,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 +5852,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 +6149,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 +6399,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 +6637,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 +6841,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 +7073,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 +7288,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 +7553,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 +7744,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..fd3b13d2cd3 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); @@ -3697,7 +3699,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 +3728,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 +3770,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 +3800,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 +3818,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 +3831,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 +3847,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 +3889,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 +3900,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 +3917,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 +3950,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 +4008,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 +4031,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 +4081,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 +4129,19 @@ 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); 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 +4164,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 +4176,10 @@ dump: &offsets, heap, mtr, &page_cur); } - updated_in_place: mem_heap_free(heap); + + DBUG_VOID_RETURN; } /****************************************************************//** @@ -4378,7 +4408,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 +4441,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 +4450,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 +4463,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 +4514,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 +4707,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 +4731,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 +4815,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 +4872,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 +5003,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 +5033,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 +5049,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..1d6aaab60bc 100644 --- a/storage/innobase/include/api0api.h +++ b/storage/innobase/include/api0api.h @@ -728,7 +728,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..e2bc599d598 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,28 @@ 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)); /*************************************************************//** 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 +346,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 +387,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 +407,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 +420,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/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..1f5ab0d7923 100644 --- a/storage/innobase/include/db0err.h +++ b/storage/innobase/include/db0err.h @@ -124,6 +124,9 @@ 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 */ /* 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( + 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 671f67eb1f8..bc90e2ddfaf 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 @@ -916,7 +916,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..8fb31678af9 100644 --- a/storage/innobase/include/dict0stats.ic +++ b/storage/innobase/include/dict0stats.ic @@ -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) /*****************************************************************//** -Wait until background stats thread has stopped using the specified table(s). +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. 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..6acb6a2dcbe 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,11 @@ 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 + #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(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(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..f94112ef4d4 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 */ @@ -844,7 +859,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 +909,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 +938,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 +985,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 +1018,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 . */ @@ -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..b714d326487 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 */ 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 a16ce656f04..6fdad6a0b89 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 @@ -396,8 +396,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, @@ -595,4 +595,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..0c5a336a1f0 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 @@ -413,9 +413,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 8e6fdaed3d5..2c8bff47952 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..1e61ea54e7b 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 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..3257402d8aa 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,14 +299,16 @@ 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 /**********************************************************//** @@ -318,7 +320,8 @@ 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/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 */ @@ -276,6 +276,30 @@ page_is_leaf( return(!*(const uint16*) (page + (PAGE_HEADER + PAGE_LEVEL))); } +/************************************************************//** +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 */ @@ -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_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 + 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 - 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/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/srv0mon.h b/storage/innobase/include/srv0mon.h index 48d4b94dcae..209894833a0 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, 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/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 bb84c1806f2..a75d925d4eb 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 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..a4d292b4f0f 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 14 /* 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/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 1152152cc77..be51c395aae 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 /* Restricts the length of search we will do in the waits-for graph of transactions */ @@ -369,7 +370,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 @@ -1498,6 +1499,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), @@ -1508,8 +1510,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); } @@ -1860,6 +1861,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); @@ -2113,6 +2115,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); @@ -2190,8 +2194,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); @@ -3599,16 +3604,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); } + } while (lock != NULL + && lock->trx->lock.deadlock_mark > ctx->mark_start); - if (lock == NULL) { - return(NULL); - } - - } 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); } @@ -3643,20 +3646,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); @@ -3734,44 +3737,6 @@ lock_deadlock_select_victim( return(ctx->wait_lock->trx); } -/********************************************************************//** -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. */ @@ -3781,23 +3746,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]); } /********************************************************************//** @@ -3853,23 +3806,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); - ++ctx->cost; + while (ctx->depth > 0 && lock == NULL) { + const lock_stack_t* stack; - if (lock_deadlock_check(ctx, lock) == NULL) { + /* Restore previous search state. */ - /* No conflict found, skip this lock. */ + stack = lock_deadlock_pop(ctx); + + 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); @@ -3887,6 +3871,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)) { @@ -3901,31 +3887,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); } @@ -4278,6 +4250,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)); @@ -4460,6 +4433,35 @@ lock_table( return(err); } +/*********************************************************************//** +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); + lock_table_create(table, LOCK_IX, trx); + 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 */ @@ -4853,15 +4855,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); + } } } @@ -5820,8 +5828,11 @@ bool lock_validate() /*===========*/ { - lock_mutex_enter(); + typedef std::pair page_addr_t; + typedef std::set 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)); @@ -5840,20 +5851,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 */ @@ -7053,4 +7063,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..a90d49becdf 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 @@ -852,7 +852,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 +1161,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 +1290,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 +1323,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 +1787,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 +1799,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 +1855,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 +1906,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 +1937,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 +2070,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 +2196,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 +2294,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 +2329,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 +2458,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..cb7fd244172 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); + 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( + dyn_block_get_data(block)); + mtr_memo_slot_t* slot + = reinterpret_cast( + dyn_block_get_data(block) + + dyn_block_get_used(block)); - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); - slot = static_cast( - dyn_array_get_element(memo, offset)); - - mtr_memo_slot_release(mtr, slot); + while (slot-- != start) { + if (slot->object != NULL) { + mtr_memo_slot_release(mtr, slot); + } + } } } @@ -339,46 +342,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); + /* 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); - memo = &(mtr->memo); + 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( + dyn_block_get_data(block)); + mtr_memo_slot_t* slot + = reinterpret_cast( + dyn_block_get_data(block) + + dyn_block_get_used(block)); - offset = dyn_array_get_data_size(memo); + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - - slot = static_cast( - 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; + 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/os/os0file.cc b/storage/innobase/os/os0file.cc index d1b2b12bf59..d9c6e43ee14 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; @@ -1800,8 +1789,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 +1851,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 */ { @@ -3358,8 +3347,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 +4074,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 +5312,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/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_; @@ -1159,85 +1160,23 @@ use_heap: return(insert_rec); } -/***********************************************************//** -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(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 (page_rec_is_supremum(rec)) { - + 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)) { @@ -2172,6 +2173,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 */ @@ -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/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 3a5d2f579c3..43072159b9e 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 @@ -1839,6 +1839,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..275fedbfb5d 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( 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; @@ -450,7 +450,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; diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index f5eb31191a5..b753574158a 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); } diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index c1c27152831..49fb374e2aa 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 @@ -1705,16 +1705,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) { @@ -1938,6 +1944,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)) { @@ -1947,6 +1954,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. */ @@ -1958,13 +1975,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) { @@ -1990,6 +2005,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 { @@ -2484,7 +2512,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..170358147b1 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 +#include /** 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_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 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(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( + 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; - } - } + const ulint col_no + = dict_field_get_col(ifield)->ind; - /* 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; + 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); -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); - - if (len == UNIV_SQL_NULL) { - log->error = DB_INVALID_NULL; - tuple = NULL; - goto func_exit; - } - - 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( - 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_set_data( - dfield, - mem_heap_dup(*heap, field, len), len); + 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)); + + if (ifield->prefix_len) { + ulint len = dtype_get_at_most_n_mbchars( + prtype, mbminmaxlen, + ifield->prefix_len, + dfield_get_len(dfield), + static_cast( + dfield_get_data(dfield))); + + ut_ad(len <= dfield_get_len(dfield)); + dfield_set_len(dfield, len); } } @@ -988,66 +1121,80 @@ 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 */ -{ - 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 */ - - /* Protect transitions of index->online_status and access to - index->online_log. */ - rw_lock_s_lock(&index->lock); - - 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; - - if (!trxs) { - index->online_log->trx_rb = trxs = new trx_id_set(); - } - - trxs->insert(trx_id); - - mutex_exit(&index->online_log->mutex); - } - - rw_lock_s_unlock(&index->lock); -} - -/******************************************************//** -Check if a transaction rollback has been initiated. -@return true if inserts of this transaction were rolled back */ -UNIV_INTERN -bool -row_log_table_is_rollback( -/*======================*/ - const dict_index_t* index, /*!< in: clustered index */ - trx_id_t trx_id) /*!< in: transaction id */ +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)); ut_ad(dict_index_is_online_ddl(index)); - ut_ad(index->online_log); +#ifdef UNIV_SYNC_DEBUG + ut_ad(rw_lock_own(&index->lock, RW_LOCK_EX)); +#endif /* UNIV_SYNC_DEBUG */ + ut_ad(page_no != FIL_NULL); - 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); - - return(is_rollback); + if (index->online_log->error != DB_SUCCESS) { + return; } - return(false); + page_no_map* blobs = index->online_log->blobs; + + if (!blobs) { + index->online_log->blobs = blobs = new page_no_map(); + } + +#ifdef UNIV_DEBUG + const ulonglong log_pos = index->online_log->tail.total; +#else +# define log_pos /* empty */ +#endif /* UNIV_DEBUG */ + + const page_no_map::value_type v(page_no, + row_log_table_blob_t(log_pos)); + + std::pair p = blobs->insert(v); + + if (!p.second) { + /* Update the existing mapping. */ + ut_ad(p.first->first == page_no); + p.first->second.blob_free(log_pos); + } +#undef log_pos +} + +/******************************************************//** +Notes that a BLOB is being allocated during online ALTER TABLE. */ +UNIV_INTERN +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)); +#ifdef UNIV_SYNC_DEBUG + ut_ad(rw_lock_own(&index->lock, RW_LOCK_EX)); +#endif /* UNIV_SYNC_DEBUG */ + ut_ad(page_no != FIL_NULL); + + if (index->online_log->error != DB_SUCCESS) { + return; + } + + /* 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); + } + } } /******************************************************//** @@ -1069,17 +1216,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 +1257,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); } @@ -1685,7 +1849,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) { @@ -1783,7 +1947,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 +1957,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 +1966,8 @@ row_log_table_apply_op( return(NULL); } + const mrec_t* const mrec_start = mrec; + switch (*mrec++) { default: ut_ad(0); @@ -1830,6 +1997,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 +2032,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 +2190,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); { @@ -2036,6 +2208,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 +2596,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 +2628,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 +2642,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 +2650,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 +2664,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 +2675,7 @@ row_log_allocate( atomic operations in both cases. */ MONITOR_ATOMIC_INC(MONITOR_ONLINE_CREATE_INDEX); - return(true); + DBUG_RETURN(true); } /******************************************************//** @@ -2508,7 +2688,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); @@ -3183,6 +3363,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)); @@ -3225,5 +3406,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..a0c0fd2c8c3 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 @@ -260,14 +260,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); @@ -325,18 +326,12 @@ row_merge_buf_add( fts_doc_item_t* doc_item; byte* value; - if (dfield_is_null(field)) { - n_row_added = 1; - continue; - } - - doc_item = static_cast( - mem_heap_alloc( - buf->heap, - sizeof(fts_doc_item_t))); - /* 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,14 +342,23 @@ 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); } } + if (dfield_is_null(field)) { + n_row_added = 1; + continue; + } + + doc_item = static_cast( + mem_heap_alloc( + buf->heap, + sizeof(*doc_item))); + value = static_cast( ut_malloc(field->len)); memcpy(value, field->data, field->len); @@ -458,7 +462,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 +488,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 +503,7 @@ row_merge_buf_add( dfield_dup(field++, buf->heap); } while (--n_fields); - return(n_row_added); + DBUG_RETURN(n_row_added); } /*************************************************************//** @@ -1180,6 +1184,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 +1401,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 +1463,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, @@ -1692,10 +1685,16 @@ 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; + + /* 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; } 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 +1706,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 @@ -1731,7 +1755,7 @@ wait_again: trx->op_info = ""; - return(err); + DBUG_RETURN(err); } /** Write a record via buffer 2 and read the next record to buffer N. @@ -2092,13 +2116,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 +2151,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 +2219,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 +2281,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 +2403,7 @@ err_exit: mem_heap_free(ins_heap); mem_heap_free(heap); - return(error); + DBUG_RETURN(error); } /*********************************************************************//** @@ -2903,7 +2891,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 +3102,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 +3174,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 +3198,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 +3326,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 +3384,12 @@ 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; + DBUG_ENTER("row_merge_build_indexes"); ut_ad(!srv_read_only_mode); ut_ad((old_table == new_table) == !col_map); @@ -3493,7 +3403,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 +3411,14 @@ row_merge_build_indexes( merge_files = static_cast( 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; @@ -3565,41 +3483,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: @@ -3763,5 +3656,5 @@ func_exit: } } - return(error); + DBUG_RETURN(error); } diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 808bd0aaeb5..9aceb305493 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) */ @@ -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(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); } @@ -5182,6 +5225,7 @@ func_exit: dtuple_get_nth_field(prev_entry, i))) { contains_null = TRUE; + break; } } 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..79cced1c533 100644 --- a/storage/innobase/row/row0quiesce.cc +++ b/storage/innobase/row/row0quiesce.cc @@ -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..690c6e958fe 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); @@ -4154,7 +4154,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; } @@ -5333,7 +5335,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 f97c0c3c82b..ccb905b36f4 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2437,6 +2437,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..d98315ae9a2 100644 --- a/storage/innobase/srv/srv0mon.cc +++ b/storage/innobase/srv/srv0mon.cc @@ -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", @@ -1616,7 +1620,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 4c5753ac40e..a25469f35b7 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. @@ -1459,20 +1459,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 */ @@ -2540,7 +2550,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. */ @@ -2576,7 +2588,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; @@ -2605,9 +2618,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); @@ -2644,6 +2658,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); @@ -2677,7 +2693,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..065a6c94074 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. @@ -220,9 +220,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 +522,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 +539,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 +574,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 +587,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 +881,7 @@ open_or_create_data_files( } if (ret == FALSE) { + const char* check_msg; /* We open the data file */ if (one_created) { @@ -961,13 +977,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 +1106,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,6 +1484,7 @@ 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; @@ -1579,10 +1609,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 @@ -1723,6 +1749,10 @@ innobase_start_or_create_for_mysql(void) 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 +1906,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 +2034,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 +2079,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 +2232,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 +2284,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 +2327,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 +2348,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 +2376,17 @@ files_checked: an .ibd file. We also determine the maximum tablespace id used. */ + dict_check_t dict_check; - dict_check_tablespaces_and_store_max_id( - recv_needed_recovery); + 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(dict_check); } if (!srv_force_recovery @@ -2420,8 +2462,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); @@ -2517,6 +2560,13 @@ files_checked: 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..00f92239b64 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. @@ -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) { diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index f6d8dfc6b40..0747cffb791 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -1320,7 +1320,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 +1399,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 d07e40c506d..1089607c6d1 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 @@ -97,7 +97,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( @@ -110,7 +110,7 @@ trx_rollback_to_savepoint_low( /* Free the memory reserved by the undo graph. */ que_graph_free(static_cast( - roll_node->undo_thr->common.parent)); + roll_node->undo_thr->common.parent)); } if (savept == NULL) { @@ -628,7 +628,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)) { @@ -689,31 +690,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; @@ -1049,7 +1051,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 7c2bbc90ad9..ea7ad65ffd9 100644 --- a/storage/innobase/trx/trx0sys.cc +++ b/storage/innobase/trx/trx0sys.cc @@ -121,7 +121,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 diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 2dfa78b229a..288e06173c0 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 of table_id */ +typedef std::set 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; @@ -306,6 +312,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); } @@ -385,6 +394,96 @@ trx_list_rw_insert_ordered( 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. @@ -447,9 +546,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) { @@ -534,9 +633,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) { @@ -590,6 +689,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. */ @@ -616,6 +717,8 @@ trx_lists_init_at_db_start(void) if (trx_created) { trx_list_rw_insert_ordered(trx); } + + trx_resurrect_table_locks(trx, undo); } } } @@ -722,10 +825,10 @@ trx_start_low( srv_undo_logs, srv_undo_tablespaces); } - /* 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)); @@ -824,22 +927,18 @@ 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 */ { - - 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 @@ -867,15 +966,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); @@ -892,38 +991,15 @@ trx_write_serialisation_history( trx_sys_update_mysql_binlog_offset( trx->mysql_log_file_name, trx->mysql_log_offset, - TRX_SYS_MYSQL_LOG_INFO, &mtr); + TRX_SYS_MYSQL_LOG_INFO, 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( /*=======================*/ @@ -954,20 +1030,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( ib_vector_last(trx->fts_trx->savepoints)); @@ -977,7 +1053,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); @@ -1038,50 +1114,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)) { @@ -1206,8 +1248,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; @@ -1227,7 +1271,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); @@ -1244,6 +1288,96 @@ trx_commit( hold for recovered transactions or system transactions. */ } +/****************************************************************//** +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 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 diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc index 3c94d96c3ac..e2176a4603a 100644 --- a/storage/innobase/ut/ut0ut.cc +++ b/storage/innobase/ut/ut0ut.cc @@ -814,6 +814,10 @@ 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"); /* 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/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/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 43cfa23a99f..9f717524ce2 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -3763,6 +3763,9 @@ innobase_end( mysql_mutex_destroy(&pending_checkpoint_mutex); } + my_free(fts_server_stopword_table); + fts_server_stopword_table= NULL; + DBUG_RETURN(err); } From ba26b71d316e31ae6f5db57e13800f514ac83ec5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 1 Feb 2014 09:34:07 +0100 Subject: [PATCH 155/163] MDEV-5549 Wrong row counter in found_rows() result only let filesort() count rows for SQL_CALC_ROWS if it's using priority queue --- mysql-test/r/select_found.result | 11 +++++++++++ mysql-test/t/select_found.test | 13 +++++++++++++ sql/filesort.cc | 9 +++++++-- sql/sql_select.cc | 12 +++++++----- sql/sql_select.h | 7 +++++++ 5 files changed, 45 insertions(+), 7 deletions(-) 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/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/sql/filesort.cc b/sql/filesort.cc index 2b0a91bf5d0..183edf67466 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -595,7 +595,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]; @@ -714,9 +714,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(); } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index c109ee10877..1a1a39ad166 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3065,8 +3065,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); @@ -18535,8 +18534,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")); @@ -20394,7 +20392,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) { diff --git a/sql/sql_select.h b/sql/sql_select.h index c413d0ca023..bd0433eb5ee 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -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. @@ -1334,6 +1340,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 From 6c9c8d569e701e28437e5ef379c98417e8f51b0a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 1 Feb 2014 10:40:58 +0100 Subject: [PATCH 156/163] sphinxse 0.9.9 --- CMakeLists.txt | 11 + Makefile.am | 59 + gen_data.php | 37 + ha_sphinx.cc | 3172 ++++++++++++++++++++++++++++++++++++++++++++ ha_sphinx.h | 164 +++ make-patch.sh | 36 + plug.in | 5 + snippets_udf.cc | 766 +++++++++++ sphinx.5.0.22.diff | 284 ++++ sphinx.5.0.27.diff | 284 ++++ sphinx.5.0.37.diff | 338 +++++ 11 files changed, 5156 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 Makefile.am create mode 100644 gen_data.php create mode 100644 ha_sphinx.cc create mode 100644 ha_sphinx.h create mode 100644 make-patch.sh create mode 100644 plug.in create mode 100644 snippets_udf.cc create mode 100644 sphinx.5.0.22.diff create mode 100644 sphinx.5.0.27.diff create mode 100644 sphinx.5.0.37.diff diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000000..2bc04eefc44 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,11 @@ +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +ADD_DEFINITIONS(-DMYSQL_SERVER) + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/sql + ${CMAKE_SOURCE_DIR}/extra/yassl/include + ${CMAKE_SOURCE_DIR}/regex) + +SET(SPHINX_SOURCES ha_sphinx.cc) +ADD_LIBRARY(sphinx ha_sphinx.cc) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000000..9341fc30a3d --- /dev/null +++ b/Makefile.am @@ -0,0 +1,59 @@ +# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB +# +# This 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 2 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +#called from the top level Makefile + +MYSQLDATAdir = $(localstatedir) +MYSQLSHAREdir = $(pkgdatadir) +MYSQLBASEdir= $(prefix) +MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(pkglibdir)/plugin +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ + -I$(top_srcdir)/regex \ + -I$(top_srcdir)/sql \ + -I$(srcdir) +SUBDIRS = ../../include ../../mysys ../../strings ../../dbug ../../extra +WRAPLIBS= + +LDADD = + +DEFS= @DEFS@ \ + -D_REENTRANT -D_PTHREADS -DENGINE -DSTORAGE_ENGINE -DMYSQL_SERVER + +noinst_HEADERS = ha_sphinx.h + +EXTRA_LTLIBRARIES = ha_sphinx.la +pkgplugin_LTLIBRARIES = @plugin_sphinx_shared_target@ sphinx.la + +ha_sphinx_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +ha_sphinx_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN +ha_sphinx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN +ha_sphinx_la_SOURCES = ha_sphinx.cc + +sphinx_la_LDFLAGS = -module +sphinx_la_CXXFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN +sphinx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN +sphinx_la_SOURCES = snippets_udf.cc + +EXTRA_LIBRARIES = libsphinx.a +noinst_LIBRARIES = @plugin_sphinx_static_target@ +libsphinx_a_CXXFLAGS = $(AM_CFLAGS) +libsphinx_a_CFLAGS = $(AM_CFLAGS) +libsphinx_a_SOURCES= ha_sphinx.cc + +EXTRA_DIST = cmakelists.txt +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/gen_data.php b/gen_data.php new file mode 100644 index 00000000000..dac374f095d --- /dev/null +++ b/gen_data.php @@ -0,0 +1,37 @@ + diff --git a/ha_sphinx.cc b/ha_sphinx.cc new file mode 100644 index 00000000000..94e7e3a4cae --- /dev/null +++ b/ha_sphinx.cc @@ -0,0 +1,3172 @@ +// +// $Id$ +// + +#ifdef USE_PRAGMA_IMPLEMENTATION +#pragma implementation // gcc: Class implementation +#endif + +#if _MSC_VER>=1400 +#define _CRT_SECURE_NO_DEPRECATE 1 +#define _CRT_NONSTDC_NO_DEPRECATE 1 +#endif + +#include + +#if MYSQL_VERSION_ID>50100 +#include "mysql_priv.h" +#include +#else +#include "../mysql_priv.h" +#endif + +#include +#include + +#ifndef __WIN__ + // UNIX-specific + #include + #include + #include + + #define RECV_FLAGS MSG_WAITALL + + #define sphSockClose(_sock) ::close(_sock) +#else + // Windows-specific + #include + #define strcasecmp stricmp + #define snprintf _snprintf + + #define RECV_FLAGS 0 + + #define sphSockClose(_sock) ::closesocket(_sock) +#endif + +#include +#include "ha_sphinx.h" + +#ifndef MSG_WAITALL +#define MSG_WAITALL 0 +#endif + +#if _MSC_VER>=1400 +#pragma warning(push,4) +#endif + +///////////////////////////////////////////////////////////////////////////// + +/// there might be issues with min() on different platforms (eg. Gentoo, they say) +#define Min(a,b) ((a)<(b)?(a):(b)) + +/// unaligned RAM accesses are forbidden on SPARC +#if defined(sparc) || defined(__sparc__) +#define UNALIGNED_RAM_ACCESS 0 +#else +#define UNALIGNED_RAM_ACCESS 1 +#endif + + +#if UNALIGNED_RAM_ACCESS + +/// pass-through wrapper +template < typename T > inline T sphUnalignedRead ( const T & tRef ) +{ + return tRef; +} + +/// pass-through wrapper +template < typename T > void sphUnalignedWrite ( void * pPtr, const T & tVal ) +{ + *(T*)pPtr = tVal; +} + +#else + +/// unaligned read wrapper for some architectures (eg. SPARC) +template < typename T > +inline T sphUnalignedRead ( const T & tRef ) +{ + T uTmp; + byte * pSrc = (byte *) &tRef; + byte * pDst = (byte *) &uTmp; + for ( int i=0; i<(int)sizeof(T); i++ ) + *pDst++ = *pSrc++; + return uTmp; +} + +/// unaligned write wrapper for some architectures (eg. SPARC) +template < typename T > +void sphUnalignedWrite ( void * pPtr, const T & tVal ) +{ + byte * pDst = (byte *) pPtr; + byte * pSrc = (byte *) &tVal; + for ( int i=0; i<(int)sizeof(T); i++ ) + *pDst++ = *pSrc++; +} + +#endif + +///////////////////////////////////////////////////////////////////////////// + +// FIXME! make this all dynamic +#define SPHINXSE_MAX_FILTERS 32 + +#define SPHINXSE_DEFAULT_HOST "127.0.0.1" +#define SPHINXSE_DEFAULT_PORT 9312 +#define SPHINXSE_DEFAULT_INDEX "*" + +#define SPHINXSE_SYSTEM_COLUMNS 3 + +#define SPHINXSE_MAX_ALLOC (16*1024*1024) +#define SPHINXSE_MAX_KEYWORDSTATS 4096 + +// FIXME! all the following is cut-n-paste from sphinx.h and searchd.cpp +#define SPHINX_VERSION "0.9.9" + +enum +{ + SPHINX_SEARCHD_PROTO = 1, + SEARCHD_COMMAND_SEARCH = 0, + VER_COMMAND_SEARCH = 0x116, +}; + +/// search query sorting orders +enum ESphSortOrder +{ + SPH_SORT_RELEVANCE = 0, ///< sort by document relevance desc, then by date + SPH_SORT_ATTR_DESC = 1, ///< sort by document date desc, then by relevance desc + SPH_SORT_ATTR_ASC = 2, ///< sort by document date asc, then by relevance desc + SPH_SORT_TIME_SEGMENTS = 3, ///< sort by time segments (hour/day/week/etc) desc, then by relevance desc + SPH_SORT_EXTENDED = 4, ///< sort by SQL-like expression (eg. "@relevance DESC, price ASC, @id DESC") + SPH_SORT_EXPR = 5, ///< sort by expression + + SPH_SORT_TOTAL +}; + +/// search query matching mode +enum ESphMatchMode +{ + SPH_MATCH_ALL = 0, ///< match all query words + SPH_MATCH_ANY, ///< match any query word + SPH_MATCH_PHRASE, ///< match this exact phrase + SPH_MATCH_BOOLEAN, ///< match this boolean query + SPH_MATCH_EXTENDED, ///< match this extended query + SPH_MATCH_FULLSCAN, ///< match all document IDs w/o fulltext query, apply filters + SPH_MATCH_EXTENDED2, ///< extended engine V2 + + SPH_MATCH_TOTAL +}; + +/// search query relevance ranking mode +enum ESphRankMode +{ + SPH_RANK_PROXIMITY_BM25 = 0, ///< default mode, phrase proximity major factor and BM25 minor one + SPH_RANK_BM25 = 1, ///< statistical mode, BM25 ranking only (faster but worse quality) + SPH_RANK_NONE = 2, ///< no ranking, all matches get a weight of 1 + SPH_RANK_WORDCOUNT = 3, ///< simple word-count weighting, rank is a weighted sum of per-field keyword occurence counts + SPH_RANK_PROXIMITY = 4, ///< phrase proximity + SPH_RANK_MATCHANY = 5, ///< emulate old match-any weighting + SPH_RANK_FIELDMASK = 6, ///< sets bits where there were matches + + SPH_RANK_TOTAL, + SPH_RANK_DEFAULT = SPH_RANK_PROXIMITY_BM25 +}; + +/// search query grouping mode +enum ESphGroupBy +{ + SPH_GROUPBY_DAY = 0, ///< group by day + SPH_GROUPBY_WEEK = 1, ///< group by week + SPH_GROUPBY_MONTH = 2, ///< group by month + SPH_GROUPBY_YEAR = 3, ///< group by year + SPH_GROUPBY_ATTR = 4 ///< group by attribute value +}; + +/// known attribute types +enum +{ + SPH_ATTR_NONE = 0, ///< not an attribute at all + SPH_ATTR_INTEGER = 1, ///< this attr is just an integer + SPH_ATTR_TIMESTAMP = 2, ///< this attr is a timestamp + SPH_ATTR_ORDINAL = 3, ///< this attr is an ordinal string number (integer at search time, specially handled at indexing time) + SPH_ATTR_BOOL = 4, ///< this attr is a boolean bit field + SPH_ATTR_FLOAT = 5, + SPH_ATTR_BIGINT = 6, + + SPH_ATTR_MULTI = 0x40000000UL ///< this attr has multiple values (0 or more) +}; + +/// known answers +enum +{ + SEARCHD_OK = 0, ///< general success, command-specific reply follows + SEARCHD_ERROR = 1, ///< general failure, error message follows + SEARCHD_RETRY = 2, ///< temporary failure, error message follows, client should retry later + SEARCHD_WARNING = 3 ///< general success, warning message and command-specific reply follow +}; + +////////////////////////////////////////////////////////////////////////////// + +#define SPHINX_DEBUG_OUTPUT 0 +#define SPHINX_DEBUG_CALLS 0 + +#include + +#if SPHINX_DEBUG_OUTPUT +inline void SPH_DEBUG ( const char * format, ... ) +{ + va_list ap; + va_start ( ap, format ); + fprintf ( stderr, "SphinxSE: " ); + vfprintf ( stderr, format, ap ); + fprintf ( stderr, "\n" ); + va_end ( ap ); +} +#else +inline void SPH_DEBUG ( const char *, ... ) {} +#endif + +#if SPHINX_DEBUG_CALLS + +#define SPH_ENTER_FUNC() { SPH_DEBUG ( "enter %s", __FUNCTION__ ); } +#define SPH_ENTER_METHOD() { SPH_DEBUG ( "enter %s(this=%08x)", __FUNCTION__, this ); } +#define SPH_RET(_arg) { SPH_DEBUG ( "leave %s", __FUNCTION__ ); return _arg; } +#define SPH_VOID_RET() { SPH_DEBUG ( "leave %s", __FUNCTION__ ); return; } + +#else + +#define SPH_ENTER_FUNC() +#define SPH_ENTER_METHOD() +#define SPH_RET(_arg) { return(_arg); } +#define SPH_VOID_RET() { return; } + +#endif + + +#define SafeDelete(_arg) { if ( _arg ) delete ( _arg ); (_arg) = NULL; } +#define SafeDeleteArray(_arg) { if ( _arg ) delete [] ( _arg ); (_arg) = NULL; } + +////////////////////////////////////////////////////////////////////////////// + +/// a structure that will be shared among all open Sphinx SE handlers +struct CSphSEShare +{ + pthread_mutex_t m_tMutex; + THR_LOCK m_tLock; + + char * m_sTable; + char * m_sScheme; + char * m_sHost; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY + char * m_sSocket; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY + char * m_sIndex; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY + ushort m_iPort; + uint m_iTableNameLen; + uint m_iUseCount; + CHARSET_INFO * m_pTableQueryCharset; + + int m_iTableFields; + char ** m_sTableField; + enum_field_types * m_eTableFieldType; + + CSphSEShare () + : m_sTable ( NULL ) + , m_sScheme ( NULL ) + , m_sHost ( NULL ) + , m_sSocket ( NULL ) + , m_sIndex ( NULL ) + , m_iPort ( 0 ) + , m_iTableNameLen ( 0 ) + , m_iUseCount ( 1 ) + , m_pTableQueryCharset ( NULL ) + + , m_iTableFields ( 0 ) + , m_sTableField ( NULL ) + , m_eTableFieldType ( NULL ) + { + thr_lock_init ( &m_tLock ); + pthread_mutex_init ( &m_tMutex, MY_MUTEX_INIT_FAST ); + } + + ~CSphSEShare () + { + pthread_mutex_destroy ( &m_tMutex ); + thr_lock_delete ( &m_tLock ); + + SafeDeleteArray ( m_sTable ); + SafeDeleteArray ( m_sScheme ); + ResetTable (); + } + + void ResetTable () + { + for ( int i=0; i m_dIds; + Dynamic_array m_dValues; + }; + Dynamic_array m_dOverrides; + +public: + char m_sParseError[256]; + +public: + CSphSEQuery ( const char * sQuery, int iLength, const char * sIndex ); + ~CSphSEQuery (); + + bool Parse (); + int BuildRequest ( char ** ppBuffer ); + +protected: + char * m_pBuf; + char * m_pCur; + int m_iBufLeft; + bool m_bBufOverrun; + + template < typename T > int ParseArray ( T ** ppValues, const char * sValue ); + bool ParseField ( char * sField ); + + void SendBytes ( const void * pBytes, int iBytes ); + void SendWord ( short int v ) { v = ntohs(v); SendBytes ( &v, sizeof(short int) ); } + void SendInt ( int v ) { v = ntohl(v); SendBytes ( &v, sizeof(int) ); } + void SendDword ( uint v ) { v = ntohl(v) ;SendBytes ( &v, sizeof(uint) ); } + void SendUint64 ( ulonglong v ) { SendDword ( uint(v>>32) ); SendDword ( uint(v&0xFFFFFFFFUL) ); } + void SendString ( const char * v ) { int iLen = strlen(v); SendDword(iLen); SendBytes ( v, iLen ); } + void SendFloat ( float v ) { SendDword ( sphF2DW(v) ); } +}; + +template int CSphSEQuery::ParseArray ( uint32 **, const char * ); +template int CSphSEQuery::ParseArray ( longlong **, const char * ); + +////////////////////////////////////////////////////////////////////////////// + +#if MYSQL_VERSION_ID>50100 + +#if MYSQL_VERSION_ID<50114 +#error Sphinx SE requires MySQL 5.1.14 or higher if compiling for 5.1.x series! +#endif + +static handler * sphinx_create_handler ( handlerton * hton, TABLE_SHARE * table, MEM_ROOT * mem_root ); +static int sphinx_init_func ( void * p ); +static int sphinx_close_connection ( handlerton * hton, THD * thd ); +static int sphinx_panic ( handlerton * hton, enum ha_panic_function flag ); +static bool sphinx_show_status ( handlerton * hton, THD * thd, stat_print_fn * stat_print, enum ha_stat_type stat_type ); + +#else + +static bool sphinx_init_func_for_handlerton (); +static int sphinx_close_connection ( THD * thd ); +bool sphinx_show_status ( THD * thd ); + +#endif // >50100 + +////////////////////////////////////////////////////////////////////////////// + +static const char sphinx_hton_name[] = "SPHINX"; +static const char sphinx_hton_comment[] = "Sphinx storage engine " SPHINX_VERSION; + +#if MYSQL_VERSION_ID<50100 +handlerton sphinx_hton = +{ + #ifdef MYSQL_HANDLERTON_INTERFACE_VERSION + MYSQL_HANDLERTON_INTERFACE_VERSION, + #endif + sphinx_hton_name, + SHOW_OPTION_YES, + sphinx_hton_comment, + DB_TYPE_SPHINX_DB, + sphinx_init_func_for_handlerton, + 0, // slot + 0, // savepoint size + sphinx_close_connection, // close_connection + NULL, // savepoint + NULL, // rollback to savepoint + NULL, // release savepoint + NULL, // commit + NULL, // rollback + NULL, // prepare + NULL, // recover + NULL, // commit_by_xid + NULL, // rollback_by_xid + NULL, // create_cursor_read_view + NULL, // set_cursor_read_view + NULL, // close_cursor_read_view + HTON_CAN_RECREATE +}; +#else +static handlerton * sphinx_hton_ptr = NULL; +#endif + +////////////////////////////////////////////////////////////////////////////// + +// variables for Sphinx shared methods +pthread_mutex_t sphinx_mutex; // mutex to init the hash +static int sphinx_init = 0; // flag whether the hash was initialized +static HASH sphinx_open_tables; // hash used to track open tables + +////////////////////////////////////////////////////////////////////////////// +// INITIALIZATION AND SHUTDOWN +////////////////////////////////////////////////////////////////////////////// + +// hashing function +#if MYSQL_VERSION_ID>=50120 +typedef size_t GetKeyLength_t; +#else +typedef uint GetKeyLength_t; +#endif + +static byte * sphinx_get_key ( const byte * pSharePtr, GetKeyLength_t * pLength, my_bool ) +{ + CSphSEShare * pShare = (CSphSEShare *) pSharePtr; + *pLength = (size_t) pShare->m_iTableNameLen; + return (byte*) pShare->m_sTable; +} + +#if MYSQL_VERSION_ID<50100 +static int sphinx_init_func ( void * ) // to avoid unused arg warning +#else +static int sphinx_init_func ( void * p ) +#endif +{ + SPH_ENTER_FUNC(); + if ( !sphinx_init ) + { + sphinx_init = 1; + VOID ( pthread_mutex_init ( &sphinx_mutex, MY_MUTEX_INIT_FAST ) ); + hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, + sphinx_get_key, 0, 0 ); + + #if MYSQL_VERSION_ID > 50100 + handlerton * hton = (handlerton*) p; + hton->state = SHOW_OPTION_YES; + hton->db_type = DB_TYPE_DEFAULT; + hton->create = sphinx_create_handler; + hton->close_connection = sphinx_close_connection; + hton->show_status = sphinx_show_status; + hton->panic = sphinx_panic; + hton->flags = HTON_CAN_RECREATE; + #endif + } + SPH_RET(0); +} + + +#if MYSQL_VERSION_ID<50100 +static bool sphinx_init_func_for_handlerton () +{ + return sphinx_init_func ( &sphinx_hton ); +} +#endif + + +#if MYSQL_VERSION_ID>50100 + +static int sphinx_close_connection ( handlerton * hton, THD * thd ) +{ + // deallocate common handler data + SPH_ENTER_FUNC(); + void ** tmp = thd_ha_data ( thd, hton ); + CSphSEThreadData * pTls = (CSphSEThreadData*) (*tmp); + SafeDelete ( pTls ); + *tmp = NULL; + SPH_RET(0); +} + + +static int sphinx_done_func ( void * ) +{ + SPH_ENTER_FUNC(); + + int error = 0; + if ( sphinx_init ) + { + sphinx_init = 0; + if ( sphinx_open_tables.records ) + error = 1; + hash_free ( &sphinx_open_tables ); + pthread_mutex_destroy ( &sphinx_mutex ); + } + + SPH_RET(0); +} + + +static int sphinx_panic ( handlerton * hton, enum ha_panic_function ) +{ + return sphinx_done_func ( hton ); +} + +#else + +static int sphinx_close_connection ( THD * thd ) +{ + // deallocate common handler data + SPH_ENTER_FUNC(); + CSphSEThreadData * pTls = (CSphSEThreadData*) thd->ha_data[sphinx_hton.slot]; + SafeDelete ( pTls ); + thd->ha_data[sphinx_hton.slot] = NULL; + SPH_RET(0); +} + +#endif // >50100 + +////////////////////////////////////////////////////////////////////////////// +// SHOW STATUS +////////////////////////////////////////////////////////////////////////////// + +#if MYSQL_VERSION_ID>50100 +static bool sphinx_show_status ( handlerton * hton, THD * thd, stat_print_fn * stat_print, + enum ha_stat_type ) +#else +bool sphinx_show_status ( THD * thd ) +#endif +{ + SPH_ENTER_FUNC(); + +#if MYSQL_VERSION_ID<50100 + Protocol * protocol = thd->protocol; + List field_list; +#endif + + char buf1[IO_SIZE]; + uint buf1len; + char buf2[IO_SIZE]; + uint buf2len= 0; + String words; + + buf1[0] = '\0'; + buf2[0] = '\0'; + +#if MYSQL_VERSION_ID>50100 + CSphSEThreadData * pTls = (CSphSEThreadData*) ( *thd_ha_data ( thd, hton ) ); +#else + if ( have_sphinx_db!=SHOW_OPTION_YES ) + { + my_message ( ER_NOT_SUPPORTED_YET, + "failed to call SHOW SPHINX STATUS: --skip-sphinx was specified", + MYF(0) ); + SPH_RET(TRUE); + } + CSphSEThreadData * pTls = (CSphSEThreadData*) thd->ha_data[sphinx_hton.slot]; +#endif + + if ( pTls && pTls->m_bStats ) + { + const CSphSEStats * pStats = &pTls->m_tStats; + buf1len = my_snprintf ( buf1, sizeof(buf1), + "total: %d, total found: %d, time: %d, words: %d", + pStats->m_iMatchesTotal, pStats->m_iMatchesFound, pStats->m_iQueryMsec, pStats->m_iWords ); + +#if MYSQL_VERSION_ID>50100 + stat_print ( thd, sphinx_hton_name, strlen(sphinx_hton_name), + STRING_WITH_LEN("stats"), buf1, buf1len ); +#else + field_list.push_back ( new Item_empty_string ( "Type",10 ) ); + field_list.push_back ( new Item_empty_string ( "Name",FN_REFLEN ) ); + field_list.push_back ( new Item_empty_string ( "Status",10 ) ); + if ( protocol->send_fields ( &field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF ) ) + SPH_RET(TRUE); + + protocol->prepare_for_resend (); + protocol->store ( STRING_WITH_LEN("SPHINX"), system_charset_info ); + protocol->store ( STRING_WITH_LEN("stats"), system_charset_info ); + protocol->store ( buf1, buf1len, system_charset_info ); + if ( protocol->write() ) + SPH_RET(TRUE); +#endif + + if ( pStats->m_iWords ) + { + for ( int i=0; im_iWords; i++ ) + { + CSphSEWordStats & tWord = pStats->m_dWords[i]; + buf2len = my_snprintf ( buf2, sizeof(buf2), "%s%s:%d:%d ", + buf2, tWord.m_sWord, tWord.m_iDocs, tWord.m_iHits ); + } + + // convert it if we can + const char * sWord = buf2; + int iWord = buf2len; + + String sBuf3; + if ( pTls->m_pQueryCharset ) + { + uint iErrors; + sBuf3.copy ( buf2, buf2len, pTls->m_pQueryCharset, system_charset_info, &iErrors ); + sWord = sBuf3.c_ptr(); + iWord = sBuf3.length(); + } + +#if MYSQL_VERSION_ID>50100 + stat_print ( thd, sphinx_hton_name, strlen(sphinx_hton_name), + STRING_WITH_LEN("words"), sWord, iWord ); +#else + protocol->prepare_for_resend (); + protocol->store ( STRING_WITH_LEN("SPHINX"), system_charset_info ); + protocol->store ( STRING_WITH_LEN("words"), system_charset_info ); + protocol->store ( sWord, iWord, system_charset_info ); + if ( protocol->write() ) + SPH_RET(TRUE); +#endif + } + + // send last error or warning + if ( pStats->m_sLastMessage && pStats->m_sLastMessage[0] ) + { + const char * sMessageType = pStats->m_bLastError ? "error" : "warning"; + +#if MYSQL_VERSION_ID>50100 + stat_print ( thd, sphinx_hton_name, strlen(sphinx_hton_name), + sMessageType, strlen(sMessageType), pStats->m_sLastMessage, strlen(pStats->m_sLastMessage) ); +#else + protocol->prepare_for_resend (); + protocol->store ( STRING_WITH_LEN("SPHINX"), system_charset_info ); + protocol->store ( sMessageType, strlen(sMessageType), system_charset_info ); + protocol->store ( pStats->m_sLastMessage, strlen(pStats->m_sLastMessage), system_charset_info ); + if ( protocol->write() ) + SPH_RET(TRUE); +#endif + } + + } else + { + #if MYSQL_VERSION_ID < 50100 + field_list.push_back ( new Item_empty_string ( "Type", 10 ) ); + field_list.push_back ( new Item_empty_string ( "Name", FN_REFLEN ) ); + field_list.push_back ( new Item_empty_string ( "Status", 10 ) ); + if ( protocol->send_fields ( &field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF ) ) + SPH_RET(TRUE); + + protocol->prepare_for_resend (); + protocol->store ( STRING_WITH_LEN("SPHINX"), system_charset_info ); + protocol->store ( STRING_WITH_LEN("stats"), system_charset_info ); + protocol->store ( STRING_WITH_LEN("no query has been executed yet"), system_charset_info ); + if ( protocol->write() ) + SPH_RET(TRUE); + #endif + } + + #if MYSQL_VERSION_ID < 50100 + send_eof(thd); + #endif + + SPH_RET(FALSE); +} + +////////////////////////////////////////////////////////////////////////////// +// HELPERS +////////////////////////////////////////////////////////////////////////////// + +static char * sphDup ( const char * sSrc, int iLen=-1 ) +{ + if ( !sSrc ) + return NULL; + + if ( iLen<0 ) + iLen = strlen(sSrc); + + char * sRes = new char [ 1+iLen ]; + memcpy ( sRes, sSrc, iLen ); + sRes[iLen] = '\0'; + return sRes; +} + + +static void sphLogError ( const char * sFmt, ... ) +{ + // emit timestamp +#ifdef __WIN__ + SYSTEMTIME t; + GetLocalTime ( &t ); + + fprintf ( stderr, "%02d%02d%02d %2d:%02d:%02d SphinxSE: internal error: ", + (int)t.wYear % 100, (int)t.wMonth, (int)t.wDay, + (int)t.wHour, (int)t.wMinute, (int)t.wSecond ); +#else + // Unix version + time_t tStamp; + time ( &tStamp ); + + struct tm * pParsed; +#ifdef HAVE_LOCALTIME_R + struct tm tParsed; + localtime_r ( &tStamp, &tParsed ); + pParsed = &tParsed; +#else + pParsed = localtime ( &tStamp ); +#endif // HAVE_LOCALTIME_R + + fprintf ( stderr, "%02d%02d%02d %2d:%02d:%02d SphinxSE: internal error: ", + pParsed->tm_year % 100, pParsed->tm_mon + 1, pParsed->tm_mday, + pParsed->tm_hour, pParsed->tm_min, pParsed->tm_sec); +#endif // __WIN__ + + // emit message + va_list ap; + va_start ( ap, sFmt ); + vfprintf ( stderr, sFmt, ap ); + va_end ( ap ); + + // emit newline + fprintf ( stderr, "\n" ); +} + + + +// the following scheme variants are recognized +// +// sphinx://host/index +// sphinx://host:port/index +// unix://unix/domain/socket:index +// unix://unix/domain/socket +static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) +{ + SPH_ENTER_FUNC(); + + if ( share ) + { + // check incoming stuff + if ( !table ) + { + sphLogError ( "table==NULL in ParseUrl()" ); + return false; + } + if ( !table->s ) + { + sphLogError ( "(table->s)==NULL in ParseUrl()" ); + return false; + } + + // free old stuff + share->ResetTable (); + + // fill new stuff + share->m_iTableFields = table->s->fields; + if ( share->m_iTableFields ) + { + share->m_sTableField = new char * [ share->m_iTableFields ]; + share->m_eTableFieldType = new enum_field_types [ share->m_iTableFields ]; + + for ( int i=0; im_iTableFields; i++ ) + { + share->m_sTableField[i] = sphDup ( table->field[i]->field_name ); + share->m_eTableFieldType[i] = table->field[i]->type(); + } + } + } + + char * sScheme = NULL; + char * sHost = SPHINXSE_DEFAULT_HOST; + char * sIndex = SPHINXSE_DEFAULT_INDEX; + int iPort = SPHINXSE_DEFAULT_PORT; + + bool bOk = true; + while ( table->s->connect_string.length!=0 ) + { + bOk = false; + sScheme = sphDup ( table->s->connect_string.str, table->s->connect_string.length ); + + sHost = strstr ( sScheme, "://" ); + if ( !sHost ) + break; + sHost[0] = '\0'; + sHost += 2; + + if ( !strcmp ( sScheme, "unix" ) ) + { + // unix-domain socket + iPort = 0; + if (!( sIndex = strrchr ( sHost, ':' ) )) + sIndex = SPHINXSE_DEFAULT_INDEX; + else + { + *sIndex++ = '\0'; + if ( !*sIndex ) + sIndex = SPHINXSE_DEFAULT_INDEX; + } + bOk = true; + break; + } + if( strcmp ( sScheme, "sphinx" )!=0 && strcmp ( sScheme, "inet" )!=0 ) + break; + + // tcp + sHost++; + char * sPort = strchr ( sHost, ':' ); + if ( sPort ) + { + *sPort++ = '\0'; + if ( *sPort ) + { + sIndex = strchr ( sPort, '/' ); + if ( sIndex ) + *sIndex++ = '\0'; + else + sIndex = SPHINXSE_DEFAULT_INDEX; + + iPort = atoi(sPort); + if ( !iPort ) + iPort = SPHINXSE_DEFAULT_PORT; + } + } else + { + sIndex = strchr ( sHost, '/' ); + if ( sIndex ) + *sIndex++ = '\0'; + else + sIndex = SPHINXSE_DEFAULT_INDEX; + } + + bOk = true; + break; + } + + if ( !bOk ) + { + my_error ( bCreate ? ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE : ER_FOREIGN_DATA_STRING_INVALID, + MYF(0), table->s->connect_string ); + } else + { + if ( share ) + { + SafeDeleteArray ( share->m_sScheme ); + share->m_sScheme = sScheme; + share->m_sHost = sHost; + share->m_sIndex = sIndex; + share->m_iPort = (ushort)iPort; + } + } + if ( !bOk && !share ) + SafeDeleteArray ( sScheme ); + + SPH_RET(bOk); +} + + +// Example of simple lock controls. The "share" it creates is structure we will +// pass to each sphinx handler. Do you have to have one of these? Well, you have +// pieces that are used for locking, and they are needed to function. +static CSphSEShare * get_share ( const char * table_name, TABLE * table ) +{ + SPH_ENTER_FUNC(); + pthread_mutex_lock ( &sphinx_mutex ); + + CSphSEShare * pShare = NULL; + for ( ;; ) + { + // check if we already have this share +#if MYSQL_VERSION_ID>=50120 + pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); +#else +#ifdef __WIN__ + pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, (const byte *) table_name, strlen(table_name) ); +#else + pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, table_name, strlen(table_name) ); +#endif // win +#endif // pre-5.1.20 + + if ( pShare ) + { + pShare->m_iUseCount++; + break; + } + + // try to allocate new share + pShare = new CSphSEShare (); + if ( !pShare ) + break; + + // try to setup it + pShare->m_pTableQueryCharset = table->field[2]->charset(); + if ( !ParseUrl ( pShare, table, false ) ) + { + SafeDelete ( pShare ); + break; + } + + // try to hash it + pShare->m_iTableNameLen = strlen(table_name); + pShare->m_sTable = sphDup ( table_name ); + if ( my_hash_insert ( &sphinx_open_tables, (const byte *)pShare ) ) + { + SafeDelete ( pShare ); + break; + } + + // all seems fine + break; + } + + pthread_mutex_unlock ( &sphinx_mutex ); + SPH_RET(pShare); +} + + +// Free lock controls. We call this whenever we close a table. If the table had +// the last reference to the share then we free memory associated with it. +static int free_share ( CSphSEShare * pShare ) +{ + SPH_ENTER_FUNC(); + pthread_mutex_lock ( &sphinx_mutex ); + + if ( !--pShare->m_iUseCount ) + { + hash_delete ( &sphinx_open_tables, (byte *)pShare ); + SafeDelete ( pShare ); + } + + pthread_mutex_unlock ( &sphinx_mutex ); + SPH_RET(0); +} + + +#if MYSQL_VERSION_ID>50100 +static handler * sphinx_create_handler ( handlerton * hton, TABLE_SHARE * table, MEM_ROOT * mem_root ) +{ + sphinx_hton_ptr = hton; + return new ( mem_root ) ha_sphinx ( hton, table ); +} +#endif + +////////////////////////////////////////////////////////////////////////////// +// CLIENT-SIDE REQUEST STUFF +////////////////////////////////////////////////////////////////////////////// + +CSphSEQuery::CSphSEQuery ( const char * sQuery, int iLength, const char * sIndex ) + : m_sHost ( "" ) + , m_iPort ( 0 ) + , m_sIndex ( sIndex ? sIndex : "*" ) + , m_iOffset ( 0 ) + , m_iLimit ( 20 ) + , m_bQuery ( false ) + , m_sQuery ( "" ) + , m_pWeights ( NULL ) + , m_iWeights ( 0 ) + , m_eMode ( SPH_MATCH_ALL ) + , m_eRanker ( SPH_RANK_PROXIMITY_BM25 ) + , m_eSort ( SPH_SORT_RELEVANCE ) + , m_sSortBy ( "" ) + , m_iMaxMatches ( 1000 ) + , m_iMaxQueryTime ( 0 ) + , m_iMinID ( 0 ) + , m_iMaxID ( 0 ) + , m_iFilters ( 0 ) + , m_eGroupFunc ( SPH_GROUPBY_DAY ) + , m_sGroupBy ( "" ) + , m_sGroupSortBy ( "@group desc" ) + , m_iCutoff ( 0 ) + , m_iRetryCount ( 0 ) + , m_iRetryDelay ( 0 ) + , m_sGroupDistinct ( "" ) + , m_iIndexWeights ( 0 ) + , m_iFieldWeights ( 0 ) + , m_bGeoAnchor ( false ) + , m_sGeoLatAttr ( "" ) + , m_sGeoLongAttr ( "" ) + , m_fGeoLatitude ( 0.0f ) + , m_fGeoLongitude ( 0.0f ) + , m_sComment ( "" ) + + , m_pBuf ( NULL ) + , m_pCur ( NULL ) + , m_iBufLeft ( 0 ) + , m_bBufOverrun ( false ) +{ + m_sQueryBuffer = new char [ iLength+2 ]; + memcpy ( m_sQueryBuffer, sQuery, iLength ); + m_sQueryBuffer[iLength]= ';'; + m_sQueryBuffer[iLength+1]= '\0'; +} + + +CSphSEQuery::~CSphSEQuery () +{ + SPH_ENTER_METHOD(); + SafeDeleteArray ( m_sQueryBuffer ); + SafeDeleteArray ( m_pWeights ); + SafeDeleteArray ( m_pBuf ); + for ( int i=0; i +int CSphSEQuery::ParseArray ( T ** ppValues, const char * sValue ) +{ + SPH_ENTER_METHOD(); + + assert ( ppValues ); + assert ( !(*ppValues) ); + + const char * pValue; + bool bPrevDigit = false; + int iValues = 0; + + // count the values + for ( pValue=sValue; *pValue; pValue++ ) + { + bool bDigit = (*pValue)>='0' && (*pValue)<='9'; + if ( bDigit && !bPrevDigit ) + iValues++; + bPrevDigit = bDigit; + } + if ( !iValues ) + SPH_RET(0); + + // extract the values + T * pValues = new T [ iValues ]; + *ppValues = pValues; + + int iIndex = 0, iSign = 1; + T uValue = 0; + + bPrevDigit = false; + for ( pValue=sValue ;; pValue++ ) + { + bool bDigit = (*pValue)>='0' && (*pValue)<='9'; + + if ( bDigit ) + { + if ( !bPrevDigit ) + uValue = 0; + uValue = uValue*10 + ( (*pValue)-'0' ); + } + else if ( bPrevDigit ) + { + assert ( iIndexs && isspace(p[-1]) ) + p--; + *p = '\0'; + + return s; +} + + +static bool myisattr ( char c ) +{ + return + ( c>='0' && c<='9' ) || + ( c>='a' && c<='z' ) || + ( c>='A' && c<='Z' ) || + c=='_'; +} + + +bool CSphSEQuery::ParseField ( char * sField ) +{ + SPH_ENTER_METHOD(); + + // look for option name/value separator + char * sValue = strchr ( sField, '=' ); + if ( !sValue || sValue==sField || sValue[-1]=='\\' ) + { + // by default let's assume it's just query + if ( sField[0] ) + { + if ( m_bQuery ) + { + snprintf ( m_sParseError, sizeof(m_sParseError), "search query already specified; '%s' is redundant", sField ); + SPH_RET(false); + } else + { + m_sQuery = sField; + m_bQuery = true; + + // unescape + char *s = sField, *d = sField; + while ( *s ) + { + if ( *s!='\\' ) *d++ = *s; + s++; + } + *d = '\0'; + } + } + SPH_RET(true); + } + + // split + *sValue++ = '\0'; + sValue = chop ( sValue ); + int iValue = atoi ( sValue ); + + // handle options + char * sName = chop ( sField ); + + if ( !strcmp ( sName, "query" ) ) m_sQuery = sValue; + else if ( !strcmp ( sName, "host" ) ) m_sHost = sValue; + else if ( !strcmp ( sName, "port" ) ) m_iPort = iValue; + else if ( !strcmp ( sName, "index" ) ) m_sIndex = sValue; + else if ( !strcmp ( sName, "offset" ) ) m_iOffset = iValue; + else if ( !strcmp ( sName, "limit" ) ) m_iLimit = iValue; + else if ( !strcmp ( sName, "weights" ) ) m_iWeights = ParseArray ( &m_pWeights, sValue ); + else if ( !strcmp ( sName, "minid" ) ) m_iMinID = iValue; + else if ( !strcmp ( sName, "maxid" ) ) m_iMaxID = iValue; + else if ( !strcmp ( sName, "maxmatches" ) ) m_iMaxMatches = iValue; + else if ( !strcmp ( sName, "maxquerytime" ) ) m_iMaxQueryTime = iValue; + else if ( !strcmp ( sName, "groupsort" ) ) m_sGroupSortBy = sValue; + else if ( !strcmp ( sName, "distinct" ) ) m_sGroupDistinct = sValue; + else if ( !strcmp ( sName, "cutoff" ) ) m_iCutoff = iValue; + else if ( !strcmp ( sName, "comment" ) ) m_sComment = sValue; + + else if ( !strcmp ( sName, "mode" ) ) + { + + m_eMode = SPH_MATCH_ALL; + if ( !strcmp ( sValue, "any") ) m_eMode = SPH_MATCH_ANY; + else if ( !strcmp ( sValue, "phrase" ) ) m_eMode = SPH_MATCH_PHRASE; + else if ( !strcmp ( sValue, "boolean") ) m_eMode = SPH_MATCH_BOOLEAN; + else if ( !strcmp ( sValue, "ext") ) m_eMode = SPH_MATCH_EXTENDED; + else if ( !strcmp ( sValue, "extended") ) m_eMode = SPH_MATCH_EXTENDED; + else if ( !strcmp ( sValue, "ext2") ) m_eMode = SPH_MATCH_EXTENDED2; + else if ( !strcmp ( sValue, "extended2") ) m_eMode = SPH_MATCH_EXTENDED2; + else if ( !strcmp ( sValue, "all") ) m_eMode = SPH_MATCH_ALL; + else if ( !strcmp ( sValue, "fullscan") ) m_eMode = SPH_MATCH_FULLSCAN; + else + { + snprintf ( m_sParseError, sizeof(m_sParseError), "unknown matching mode '%s'", sValue ); + SPH_RET(false); + } + } else if ( !strcmp ( sName, "ranker" ) ) + { + + m_eRanker = SPH_RANK_PROXIMITY_BM25; + if ( !strcmp ( sValue, "proximity_bm25") ) m_eRanker = SPH_RANK_PROXIMITY_BM25; + else if ( !strcmp ( sValue, "bm25" ) ) m_eRanker = SPH_RANK_BM25; + else if ( !strcmp ( sValue, "none" ) ) m_eRanker = SPH_RANK_NONE; + else if ( !strcmp ( sValue, "wordcount" ) ) m_eRanker = SPH_RANK_WORDCOUNT; + else if ( !strcmp ( sValue, "proximity" ) ) m_eRanker = SPH_RANK_PROXIMITY; + else if ( !strcmp ( sValue, "matchany" ) ) m_eRanker = SPH_RANK_MATCHANY; + else if ( !strcmp ( sValue, "fieldmask" ) ) m_eRanker = SPH_RANK_FIELDMASK; + else + { + snprintf ( m_sParseError, sizeof(m_sParseError), "unknown ranking mode '%s'", sValue ); + SPH_RET(false); + } + } else if ( !strcmp ( sName, "sort" ) ) + { + static const struct + { + const char * m_sName; + ESphSortOrder m_eSort; + } dSortModes[] = + { + { "relevance", SPH_SORT_RELEVANCE }, + { "attr_desc:", SPH_SORT_ATTR_DESC }, + { "attr_asc:", SPH_SORT_ATTR_ASC }, + { "time_segments:", SPH_SORT_TIME_SEGMENTS }, + { "extended:", SPH_SORT_EXTENDED }, + { "expr:", SPH_SORT_EXPR } + }; + + int i; + const int nModes = sizeof(dSortModes)/sizeof(dSortModes[0]); + for ( i=0; i ( &tFilter.m_pValues, sValue ); + if ( !tFilter.m_iValues ) + { + assert ( !tFilter.m_pValues ); + break; + } + + // all ok + m_iFilters++; + break; + } + + } else if ( !strcmp ( sName, "indexweights" ) || !strcmp ( sName, "fieldweights" ) ) + { + bool bIndex = !strcmp ( sName, "indexweights" ); + int * pCount = bIndex ? &m_iIndexWeights : &m_iFieldWeights; + char ** pNames = bIndex ? &m_sIndexWeight[0] : &m_sFieldWeight[0]; + int * pWeights = bIndex ? &m_iIndexWeight[0] : &m_iFieldWeight[0]; + + *pCount = 0; + + char * p = sValue; + while ( *p && *pCountm_sName = chop(sName); + pOverride->m_iType = iType; + m_dOverrides.append(pOverride); + } + + ulonglong uId = strtoull ( sId, NULL, 10 ); + CSphSEQuery::Override_t::Value_t tValue; + if ( iType == SPH_ATTR_FLOAT ) + tValue.m_fValue = (float)atof(sValue); + else if ( iType == SPH_ATTR_BIGINT ) + tValue.m_iValue64 = strtoll ( sValue, NULL, 10 ); + else + tValue.m_uValue = (uint32)strtoul ( sValue, NULL, 10 ); + + pOverride->m_dIds.append ( uId ); + pOverride->m_dValues.append ( tValue ); + } + + if ( !pOverride ) + { + snprintf ( m_sParseError, sizeof(m_sParseError), "override: id:value mapping expected" ); + SPH_RET(false); + } + SPH_RET(true); + } + else + { + snprintf ( m_sParseError, sizeof(m_sParseError), "unknown parameter '%s'", sName ); + SPH_RET(false); + } + + // !COMMIT handle syntax errors + + SPH_RET(true); +} + + +bool CSphSEQuery::Parse () +{ + SPH_ENTER_METHOD(); + SPH_DEBUG ( "query [[ %s ]]", m_sQueryBuffer ); + + m_bQuery = false; + char * pCur = m_sQueryBuffer; + char * pNext = pCur; + + while (( pNext = strchr ( pNext, ';' ) )) + { + // handle escaped semicolons + if ( pNext>m_sQueryBuffer && pNext[-1]=='\\' && pNext[1]!='\0' ) + { + pNext++; + continue; + } + + // handle semicolon-separated clauses + *pNext++ = '\0'; + if ( !ParseField ( pCur ) ) + SPH_RET(false); + pCur = pNext; + } + + SPH_RET(true); +} + + +void CSphSEQuery::SendBytes ( const void * pBytes, int iBytes ) +{ + SPH_ENTER_METHOD(); + if ( m_iBufLeftm_iType == SPH_ATTR_BIGINT ? 16 : 12; // id64 + value + iReqSize += strlen ( pOverride->m_sName ) + 12 + uSize*pOverride->m_dIds.elements(); + } + // select + iReqSize += 4; + + m_iBufLeft = 0; + SafeDeleteArray ( m_pBuf ); + + m_pBuf = new char [ iReqSize ]; + if ( !m_pBuf ) + SPH_RET(-1); + + m_pCur = m_pBuf; + m_iBufLeft = iReqSize; + m_bBufOverrun = false; + (*ppBuffer) = m_pBuf; + + // build request + SendWord ( SEARCHD_COMMAND_SEARCH ); // command id + SendWord ( VER_COMMAND_SEARCH ); // command version + SendInt ( iReqSize-8 ); // packet body length + + SendInt ( 1 ); // number of queries + SendInt ( m_iOffset ); + SendInt ( m_iLimit ); + SendInt ( m_eMode ); + SendInt ( m_eRanker ); // 1.16+ + SendInt ( m_eSort ); + SendString ( m_sSortBy ); // sort attr + SendString ( m_sQuery ); // query + SendInt ( m_iWeights ); + for ( int j=0; jm_sName ); + SendDword ( pOverride->m_iType ); + SendInt ( pOverride->m_dIds.elements() ); + for ( int j=0; jm_dIds.elements(); j++ ) + { + SendUint64 ( pOverride->m_dIds.at(j) ); + if ( pOverride->m_iType == SPH_ATTR_FLOAT ) + SendFloat ( pOverride->m_dValues.at(j).m_fValue ); + else if ( pOverride->m_iType == SPH_ATTR_BIGINT ) + SendUint64 ( pOverride->m_dValues.at(j).m_iValue64 ); + else + SendDword ( pOverride->m_dValues.at(j).m_uValue ); + } + } + + // select + SendString ( "" ); + + // detect buffer overruns and underruns, and report internal error + if ( m_bBufOverrun || m_iBufLeft!=0 || m_pCur-m_pBuf!=iReqSize ) + SPH_RET(-1); + + // all fine + SPH_RET(iReqSize); +} + +////////////////////////////////////////////////////////////////////////////// +// SPHINX HANDLER +////////////////////////////////////////////////////////////////////////////// + +static const char * ha_sphinx_exts[] = { NullS }; + + +#if MYSQL_VERSION_ID<50100 +ha_sphinx::ha_sphinx ( TABLE_ARG * table ) + : handler ( &sphinx_hton, table ) +#else +ha_sphinx::ha_sphinx ( handlerton * hton, TABLE_ARG * table ) + : handler ( hton, table ) +#endif + , m_pShare ( NULL ) + , m_iMatchesTotal ( 0 ) + , m_iCurrentPos ( 0 ) + , m_pCurrentKey ( NULL ) + , m_iCurrentKeyLen ( 0 ) + , m_pResponse ( NULL ) + , m_pResponseEnd ( NULL ) + , m_pCur ( NULL ) + , m_bUnpackError ( false ) + , m_iFields ( 0 ) + , m_dFields ( NULL ) + , m_iAttrs ( 0 ) + , m_dAttrs ( NULL ) + , m_bId64 ( 0 ) + , m_dUnboundFields ( NULL ) +{ + SPH_ENTER_METHOD(); + if ( current_thd ) + current_thd->variables.engine_condition_pushdown = true; + SPH_VOID_RET(); +} + + +// If frm_error() is called then we will use this to to find out what file extentions +// exist for the storage engine. This is also used by the default rename_table and +// delete_table method in handler.cc. +const char ** ha_sphinx::bas_ext() const +{ + return ha_sphinx_exts; +} + + +// Used for opening tables. The name will be the name of the file. +// A table is opened when it needs to be opened. For instance +// when a request comes in for a select on the table (tables are not +// open and closed for each request, they are cached). +// +// Called from handler.cc by handler::ha_open(). The server opens all tables by +// calling ha_open() which then calls the handler specific open(). +int ha_sphinx::open ( const char * name, int, uint ) +{ + SPH_ENTER_METHOD(); + m_pShare = get_share ( name, table ); + if ( !m_pShare ) + SPH_RET(1); + + thr_lock_data_init ( &m_pShare->m_tLock, &m_tLock, NULL ); + + #if MYSQL_VERSION_ID>50100 + *thd_ha_data ( table->in_use, ht ) = NULL; + #else + table->in_use->ha_data [ sphinx_hton.slot ] = NULL; + #endif + + SPH_RET(0); +} + + +int ha_sphinx::ConnectToSearchd ( const char * sQueryHost, int iQueryPort ) +{ + SPH_ENTER_METHOD(); + + struct sockaddr_in sin; +#ifndef __WIN__ + struct sockaddr_un saun; +#endif + + int iDomain = 0; + int iSockaddrSize = 0; + struct sockaddr * pSockaddr = NULL; + + in_addr_t ip_addr; + int version; + uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); + + const char * sHost = ( sQueryHost && *sQueryHost ) ? sQueryHost : m_pShare->m_sHost; + ushort iPort = iQueryPort ? (ushort)iQueryPort : m_pShare->m_iPort; + + if ( iPort ) + { + iDomain = AF_INET; + iSockaddrSize = sizeof(sin); + pSockaddr = (struct sockaddr *) &sin; + + memset ( &sin, 0, sizeof(sin) ); + sin.sin_family = AF_INET; + sin.sin_port = htons(iPort); + + // prepare host address + if ( (int)( ip_addr=inet_addr(sHost) ) != (int)INADDR_NONE ) + { + memcpy ( &sin.sin_addr, &ip_addr, sizeof(ip_addr) ); + } else + { + int tmp_errno; + struct hostent tmp_hostent, *hp; + char buff2 [ GETHOSTBYNAME_BUFF_SIZE ]; + + hp = my_gethostbyname_r ( sHost, &tmp_hostent, + buff2, sizeof(buff2), &tmp_errno ); + if ( !hp ) + { + my_gethostbyname_r_free(); + + char sError[256]; + my_snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", sHost ); + + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); + SPH_RET(-1); + } + + memcpy ( &sin.sin_addr, hp->h_addr, + Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); + my_gethostbyname_r_free(); + } + } else + { +#ifndef __WIN__ + iDomain = AF_UNIX; + iSockaddrSize = sizeof(saun); + pSockaddr = (struct sockaddr *) &saun; + + memset ( &saun, 0, sizeof(saun) ); + saun.sun_family = AF_UNIX; + strncpy ( saun.sun_path, sHost, sizeof(saun.sun_path)-1 ); +#else + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), "UNIX sockets are not supported on Windows" ); + SPH_RET(-1); +#endif + } + + char sError[512]; + int iSocket = socket ( iDomain, SOCK_STREAM, 0 ); + + if ( iSocket<0 ) + { + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), "failed to create client socket" ); + SPH_RET(-1); + } + + if ( connect ( iSocket, pSockaddr, iSockaddrSize )<0 ) + { + sphSockClose ( iSocket ); + my_snprintf ( sError, sizeof(sError), "failed to connect to searchd (host=%s, errno=%d, port=%d)", + sHost, errno, iPort ); + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); + SPH_RET(-1); + } + + if ( ::recv ( iSocket, (char *)&version, sizeof(version), 0 )!=sizeof(version) ) + { + sphSockClose ( iSocket ); + my_snprintf ( sError, sizeof(sError), "failed to receive searchd version (host=%s, port=%d)", + sHost, iPort ); + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); + SPH_RET(-1); + } + + if ( ::send ( iSocket, (char*)&uClientVersion, sizeof(uClientVersion), 0 )!=sizeof(uClientVersion) ) + { + sphSockClose ( iSocket ); + my_snprintf ( sError, sizeof(sError), "failed to send client version (host=%s, port=%d)", + sHost, iPort ); + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); + SPH_RET(-1); + } + + SPH_RET(iSocket); +} + + +// Closes a table. We call the free_share() function to free any resources +// that we have allocated in the "shared" structure. +// +// Called from sql_base.cc, sql_select.cc, and table.cc. +// In sql_select.cc it is only used to close up temporary tables or during +// the process where a temporary table is converted over to being a +// myisam table. +// For sql_base.cc look at close_data_tables(). +int ha_sphinx::close() +{ + SPH_ENTER_METHOD(); + SPH_RET ( free_share(m_pShare) ); +} + + +int ha_sphinx::write_row ( uchar * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + +int ha_sphinx::update_row ( const uchar *, uchar * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + +int ha_sphinx::delete_row ( const uchar * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + +// keynr is key (index) number +// sorted is 1 if result MUST be sorted according to index +int ha_sphinx::index_init ( uint keynr, bool ) +{ + SPH_ENTER_METHOD(); + active_index = keynr; + SPH_RET(0); +} + + +int ha_sphinx::index_end() +{ + SPH_ENTER_METHOD(); + SPH_RET(0); +} + + +uint32 ha_sphinx::UnpackDword () +{ + if ( m_pCur+sizeof(uint32)>m_pResponseEnd ) + { + m_pCur = m_pResponseEnd; + m_bUnpackError = true; + return 0; + } + + uint32 uRes = ntohl ( sphUnalignedRead ( *(uint32*)m_pCur ) ); + m_pCur += sizeof(uint32); + return uRes; +} + + +char * ha_sphinx::UnpackString () +{ + uint32 iLen = UnpackDword (); + if ( !iLen ) + return NULL; + + if ( m_pCur+iLen>m_pResponseEnd ) + { + m_pCur = m_pResponseEnd; + m_bUnpackError = true; + return NULL; + } + + char * sRes = new char [ 1+iLen ]; + memcpy ( sRes, m_pCur, iLen ); + sRes[iLen] = '\0'; + m_pCur += iLen; + return sRes; +} + + +static inline const char * FixNull ( const char * s ) +{ + return s ? s : "(null)"; +} + + +bool ha_sphinx::UnpackSchema () +{ + SPH_ENTER_METHOD(); + + // cleanup + if ( m_dFields ) + for ( int i=0; i<(int)m_iFields; i++ ) + SafeDeleteArray ( m_dFields[i] ); + SafeDeleteArray ( m_dFields ); + + // unpack network packet + uint32 uStatus = UnpackDword (); + char * sMessage = NULL; + + if ( uStatus!=SEARCHD_OK ) + { + sMessage = UnpackString (); + CSphSEThreadData * pTls = GetTls (); + if ( pTls ) + { + strncpy ( pTls->m_tStats.m_sLastMessage, sMessage, sizeof(pTls->m_tStats.m_sLastMessage) ); + pTls->m_tStats.m_bLastError = ( uStatus==SEARCHD_ERROR ); + } + + if ( uStatus==SEARCHD_ERROR ) + { + char sError[1024]; + my_snprintf ( sError, sizeof(sError), "searchd error: %s", sMessage ); + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sError ); + SafeDeleteArray ( sMessage ); + SPH_RET ( false ); + } + } + + m_iFields = UnpackDword (); + m_dFields = new char * [ m_iFields ]; + if ( !m_dFields ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: UnpackSchema() failed (fields alloc error)" ); + SPH_RET(false); + } + + for ( uint32 i=0; im_iTableFields; j++ ) + { + const char * sTableField = m_pShare->m_sTableField[j]; + const char * sAttrField = m_dAttrs[i].m_sName; + if ( m_dAttrs[i].m_sName[0]=='@' ) + { + const char * sAtPrefix = "_sph_"; + if ( strncmp ( sTableField, sAtPrefix, strlen(sAtPrefix) ) ) + continue; + sTableField += strlen(sAtPrefix); + sAttrField++; + } + + if ( !strcasecmp ( sAttrField, sTableField ) ) + { + // we're almost good, but + // let's enforce that timestamp columns can only receive timestamp attributes + if ( m_pShare->m_eTableFieldType[j]!=MYSQL_TYPE_TIMESTAMP || m_dAttrs[i].m_uType==SPH_ATTR_TIMESTAMP ) + m_dAttrs[i].m_iField = j; + break; + } + } + } + + m_iMatchesTotal = UnpackDword (); + + m_bId64 = UnpackDword (); + if ( m_bId64 && m_pShare->m_eTableFieldType[0] != MYSQL_TYPE_LONGLONG ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: 1st column must be bigint to accept 64-bit DOCIDs" ); + SPH_RET(false); + } + + // network packet unpacked; build unbound fields map + SafeDeleteArray ( m_dUnboundFields ); + m_dUnboundFields = new int [ m_pShare->m_iTableFields ]; + + for ( int i=0; im_iTableFields; i++ ) + { + if ( im_eTableFieldType[i]==MYSQL_TYPE_TIMESTAMP ) + m_dUnboundFields[i] = SPH_ATTR_TIMESTAMP; + + else + m_dUnboundFields[i] = SPH_ATTR_INTEGER; + } + + for ( uint32 i=0; i=0 ) + m_dUnboundFields [ m_dAttrs[i].m_iField ] = SPH_ATTR_NONE; + + if ( m_bUnpackError ) + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: UnpackSchema() failed (unpack error)" ); + + SPH_RET(!m_bUnpackError); +} + + +bool ha_sphinx::UnpackStats ( CSphSEStats * pStats ) +{ + assert ( pStats ); + + char * pCurSave = m_pCur; + for ( uint i=0; im_iMatchesTotal = UnpackDword (); + pStats->m_iMatchesFound = UnpackDword (); + pStats->m_iQueryMsec = UnpackDword (); + pStats->m_iWords = UnpackDword (); + + if ( m_bUnpackError ) + return false; + + SafeDeleteArray ( pStats->m_dWords ); + if ( pStats->m_iWords<0 || pStats->m_iWords>=SPHINXSE_MAX_KEYWORDSTATS ) + return false; + pStats->m_dWords = new CSphSEWordStats [ pStats->m_iWords ]; + if ( !pStats->m_dWords ) + return false; + + for ( int i=0; im_iWords; i++ ) + { + CSphSEWordStats & tWord = pStats->m_dWords[i]; + tWord.m_sWord = UnpackString (); + tWord.m_iDocs = UnpackDword (); + tWord.m_iHits = UnpackDword (); + } + + if ( m_bUnpackError ) + return false; + + m_pCur = pCurSave; + return true; +} + + +/// condition pushdown implementation, to properly intercept WHERE clauses on my columns +const COND * ha_sphinx::cond_push ( const COND * cond ) +{ + // catch the simplest case: query_column="some text" + for ( ;; ) + { + if ( cond->type()!=COND::FUNC_ITEM ) + break; + + Item_func * condf = (Item_func *)cond; + if ( condf->functype()!=Item_func::EQ_FUNC || condf->argument_count()!=2 ) + break; + + Item ** args = condf->arguments(); + if ( args[0]->type()!=COND::FIELD_ITEM || args[1]->type()!=COND::STRING_ITEM ) + break; + + Item_field * pField = (Item_field *) args[0]; + if ( pField->field->field_index!=2 ) // FIXME! magic key index + break; + + // get my tls + CSphSEThreadData * pTls = GetTls (); + if ( !pTls ) + break; + + // copy the query, and let know that we intercepted this condition + Item_string * pString = (Item_string *) args[1]; + pTls->m_bQuery = true; + strncpy ( pTls->m_sQuery, pString->str_value.c_ptr(), sizeof(pTls->m_sQuery) ); + pTls->m_sQuery[sizeof(pTls->m_sQuery)-1] = '\0'; + pTls->m_pQueryCharset = pString->str_value.charset(); + return NULL; + } + + // don't change anything + return cond; +} + + +/// condition popup +void ha_sphinx::cond_pop () +{ + CSphSEThreadData * pTls = GetTls (); + if ( pTls && pTls->m_bQuery ) + pTls->m_bQuery = false; + return; +} + + +/// get TLS (maybe allocate it, too) +CSphSEThreadData * ha_sphinx::GetTls() +{ + // where do we store that pointer in today's version? + CSphSEThreadData ** ppTls; +#if MYSQL_VERSION_ID>50100 + ppTls = (CSphSEThreadData**) thd_ha_data ( table->in_use, ht ); +#else + ppTls = (CSphSEThreadData**) ¤t_thd->ha_data[sphinx_hton.slot]; +#endif // >50100 + + // allocate if needed + if ( !*ppTls ) + *ppTls = new CSphSEThreadData (); + + // errors will be handled by caller + return *ppTls; +} + + +// 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 +// index. +int ha_sphinx::index_read ( byte * buf, const byte * key, uint key_len, enum ha_rkey_function ) +{ + SPH_ENTER_METHOD(); + char sError[256]; + + // set new data for thd->ha_data, it is used in show_status + CSphSEThreadData * pTls = GetTls(); + if ( !pTls ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: TLS malloc() failed" ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + pTls->m_tStats.Reset (); + + // parse query + if ( pTls->m_bQuery ) + { + // we have a query from condition pushdown + m_pCurrentKey = (const byte *) pTls->m_sQuery; + m_iCurrentKeyLen = strlen(pTls->m_sQuery); + } else + { + // just use the key (might be truncated) + m_pCurrentKey = key+HA_KEY_BLOB_LENGTH; + m_iCurrentKeyLen = uint2korr(key); // or maybe key_len? + pTls->m_pQueryCharset = m_pShare ? m_pShare->m_pTableQueryCharset : NULL; + } + + CSphSEQuery q ( (const char*)m_pCurrentKey, m_iCurrentKeyLen, m_pShare->m_sIndex ); + if ( !q.Parse () ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), q.m_sParseError ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + // do connect + int iSocket = ConnectToSearchd ( q.m_sHost, q.m_iPort ); + if ( iSocket<0 ) + SPH_RET ( HA_ERR_END_OF_FILE ); + + // my buffer + char * pBuffer; // will be free by CSphSEQuery dtor; do NOT free manually + int iReqLen = q.BuildRequest ( &pBuffer ); + + if ( iReqLen<=0 ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: q.BuildRequest() failed" ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + // send request + ::send ( iSocket, pBuffer, iReqLen, 0 ); + + // receive reply + char sHeader[8]; + int iGot = ::recv ( iSocket, sHeader, sizeof(sHeader), RECV_FLAGS ); + if ( iGot!=sizeof(sHeader) ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "failed to receive response header (searchd went away?)" ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + short int uRespStatus = ntohs ( sphUnalignedRead ( *(short int*)( &sHeader[0] ) ) ); + short int uRespVersion = ntohs ( sphUnalignedRead ( *(short int*)( &sHeader[2] ) ) ); + uint uRespLength = ntohl ( sphUnalignedRead ( *(uint *)( &sHeader[4] ) ) ); + SPH_DEBUG ( "got response header (status=%d version=%d length=%d)", + uRespStatus, uRespVersion, uRespLength ); + + SafeDeleteArray ( m_pResponse ); + if ( uRespLength<=SPHINXSE_MAX_ALLOC ) + m_pResponse = new char [ uRespLength+1 ]; + + if ( !m_pResponse ) + { + my_snprintf ( sError, sizeof(sError), "bad searchd response length (length=%u)", uRespLength ); + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sError ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + int iRecvLength = 0; + while ( iRecvLength<(int)uRespLength ) + { + int iRecv = ::recv ( iSocket, m_pResponse+iRecvLength, uRespLength-iRecvLength, RECV_FLAGS ); + if ( iRecv<0 ) + break; + iRecvLength += iRecv; + } + + ::closesocket ( iSocket ); + iSocket = -1; + + if ( iRecvLength!=(int)uRespLength ) + { + my_snprintf ( sError, sizeof(sError), "net read error (expected=%d, got=%d)", uRespLength, iRecvLength ); + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sError ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + // we'll have a message, at least + pTls->m_bStats = true; + + // parse reply + m_iCurrentPos = 0; + m_pCur = m_pResponse; + m_pResponseEnd = m_pResponse + uRespLength; + m_bUnpackError = false; + + if ( uRespStatus!=SEARCHD_OK ) + { + char * sMessage = UnpackString (); + if ( !sMessage ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "no valid response from searchd (status=%d, resplen=%d)", + uRespStatus, uRespLength ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + strncpy ( pTls->m_tStats.m_sLastMessage, sMessage, sizeof(pTls->m_tStats.m_sLastMessage) ); + SafeDeleteArray ( sMessage ); + + if ( uRespStatus!=SEARCHD_WARNING ) + { + my_snprintf ( sError, sizeof(sError), "searchd error: %s", pTls->m_tStats.m_sLastMessage ); + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sError ); + + pTls->m_tStats.m_bLastError = true; + SPH_RET ( HA_ERR_END_OF_FILE ); + } + } + + if ( !UnpackSchema () ) + SPH_RET ( HA_ERR_END_OF_FILE ); + + if ( !UnpackStats ( &pTls->m_tStats ) ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: UnpackStats() failed" ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + SPH_RET ( get_rec ( buf, key, key_len ) ); +} + + +// Positions an index cursor to the index specified in key. Fetches the +// row if any. This is only used to read whole keys. +int ha_sphinx::index_read_idx ( byte *, uint, const byte *, uint, enum ha_rkey_function ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + +// Used to read forward through the index. +int ha_sphinx::index_next ( byte * buf ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( get_rec ( buf, m_pCurrentKey, m_iCurrentKeyLen ) ); +} + + +int ha_sphinx::index_next_same ( byte * buf, const byte * key, uint keylen ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( get_rec ( buf, key, keylen ) ); +} + + +int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) +{ + SPH_ENTER_METHOD(); + + if ( m_iCurrentPos>=m_iMatchesTotal ) + { + SafeDeleteArray ( m_pResponse ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + #if MYSQL_VERSION_ID>50100 + my_bitmap_map * org_bitmap = dbug_tmp_use_all_columns ( table, table->write_set ); + #endif + Field ** field = table->field; + + // unpack and return the match + longlong uMatchID = UnpackDword (); + if ( m_bId64 ) + uMatchID = ( uMatchID<<32 ) + UnpackDword(); + uint32 uMatchWeight = UnpackDword (); + + field[0]->store ( uMatchID, 1 ); + field[1]->store ( uMatchWeight, 1 ); + field[2]->store ( (const char*)m_pCurrentKey, m_iCurrentKeyLen, &my_charset_bin ); + + for ( uint32 i=0; i0 && !m_bUnpackError; uValue-- ) + UnpackDword(); + continue; + } + + Field * af = field [ m_dAttrs[i].m_iField ]; + switch ( m_dAttrs[i].m_uType ) + { + case SPH_ATTR_INTEGER: + case SPH_ATTR_ORDINAL: + case SPH_ATTR_BOOL: + af->store ( uValue, 1 ); + break; + + case SPH_ATTR_FLOAT: + af->store ( sphDW2F(uValue) ); + break; + + case SPH_ATTR_TIMESTAMP: + if ( af->type()==MYSQL_TYPE_TIMESTAMP ) + longstore ( af->ptr, uValue ); // because store() does not accept timestamps + else + af->store ( uValue, 1 ); + break; + + case SPH_ATTR_BIGINT: + af->store ( iValue64, 0 ); + break; + + case ( SPH_ATTR_MULTI | SPH_ATTR_INTEGER ): + if ( uValue<=0 ) + { + // shortcut, empty MVA set + af->store ( "", 0, &my_charset_bin ); + + } else + { + // convert MVA set to comma-separated string + char sBuf[1024]; // FIXME! magic size + char * pCur = sBuf; + + for ( ; uValue>0 && !m_bUnpackError; uValue-- ) + { + uint32 uEntry = UnpackDword (); + if ( pCur < sBuf+sizeof(sBuf)-16 ) // 10 chars per 32bit value plus some safety bytes + { + sprintf ( pCur, "%u", uEntry ); + while ( *pCur ) *pCur++; + if ( uValue>1 ) + *pCur++ = ','; // non-trailing commas + } + } + + af->store ( sBuf, pCur-sBuf, &my_charset_bin ); + } + break; + + default: + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: unhandled attr type" ); + SafeDeleteArray ( m_pResponse ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + } + + if ( m_bUnpackError ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: response unpacker failed" ); + SafeDeleteArray ( m_pResponse ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + // zero out unmapped fields + for ( int i=SPHINXSE_SYSTEM_COLUMNS; i<(int)table->s->fields; i++ ) + if ( m_dUnboundFields[i]!=SPH_ATTR_NONE ) + switch ( m_dUnboundFields[i] ) + { + case SPH_ATTR_INTEGER: table->field[i]->store ( 0, 1 ); break; + case SPH_ATTR_TIMESTAMP: longstore ( table->field[i]->ptr, 0 ); break; + default: + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), + "INTERNAL ERROR: unhandled unbound field type %d", m_dUnboundFields[i] ); + SafeDeleteArray ( m_pResponse ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + memset ( buf, 0, table->s->null_bytes ); + m_iCurrentPos++; + + #if MYSQL_VERSION_ID > 50100 + dbug_tmp_restore_column_map(table->write_set, org_bitmap); + #endif + + SPH_RET(0); +} + + +// Used to read backwards through the index. +int ha_sphinx::index_prev ( byte * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + +// index_first() asks for the first key in the index. +// +// Called from opt_range.cc, opt_sum.cc, sql_handler.cc, +// and sql_select.cc. +int ha_sphinx::index_first ( byte * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_END_OF_FILE ); +} + +// index_last() asks for the last key in the index. +// +// Called from opt_range.cc, opt_sum.cc, sql_handler.cc, +// and sql_select.cc. +int ha_sphinx::index_last ( byte * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + +int ha_sphinx::rnd_init ( bool ) +{ + SPH_ENTER_METHOD(); + SPH_RET(0); +} + + +int ha_sphinx::rnd_end() +{ + SPH_ENTER_METHOD(); + SPH_RET(0); +} + + +int ha_sphinx::rnd_next ( byte * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_END_OF_FILE ); +} + + +void ha_sphinx::position ( const byte * ) +{ + SPH_ENTER_METHOD(); + SPH_VOID_RET(); +} + + +// This is like rnd_next, but you are given a position to use +// to determine the row. The position will be of the type that you stored in +// ref. You can use ha_get_ptr(pos,ref_length) to retrieve whatever key +// or position you saved when position() was called. +// Called from filesort.cc records.cc sql_insert.cc sql_select.cc sql_update.cc. +int ha_sphinx::rnd_pos ( byte *, byte * ) +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + +#if MYSQL_VERSION_ID>=50030 +int ha_sphinx::info ( uint ) +#else +void ha_sphinx::info ( uint ) +#endif +{ + SPH_ENTER_METHOD(); + + if ( table->s->keys>0 ) + table->key_info[0].rec_per_key[0] = 1; + + #if MYSQL_VERSION_ID>50100 + stats.records = 20; + #else + records = 20; + #endif + +#if MYSQL_VERSION_ID>=50030 + SPH_RET(0); +#else + SPH_VOID_RET(); +#endif +} + + +int ha_sphinx::reset () +{ + SPH_ENTER_METHOD(); + CSphSEThreadData * pTls = GetTls (); + if ( pTls ) + pTls->m_bQuery = false; + SPH_RET(0); +} + + +int ha_sphinx::delete_all_rows() +{ + SPH_ENTER_METHOD(); + SPH_RET ( HA_ERR_WRONG_COMMAND ); +} + + +// First you should go read the section "locking functions for mysql" in +// lock.cc to understand this. +// This create a lock on the table. If you are implementing a storage engine +// that can handle transacations look at ha_berkely.cc to see how you will +// want to go about doing this. Otherwise you should consider calling flock() +// here. +// +// Called from lock.cc by lock_external() and unlock_external(). Also called +// from sql_table.cc by copy_data_between_tables(). +int ha_sphinx::external_lock ( THD *, int ) +{ + SPH_ENTER_METHOD(); + SPH_RET(0); +} + + +THR_LOCK_DATA ** ha_sphinx::store_lock ( THD *, THR_LOCK_DATA ** to, + enum thr_lock_type lock_type ) +{ + SPH_ENTER_METHOD(); + + if ( lock_type!=TL_IGNORE && m_tLock.type==TL_UNLOCK ) + m_tLock.type=lock_type; + + *to++ = &m_tLock; + SPH_RET(to); +} + + +int ha_sphinx::delete_table ( const char * ) +{ + SPH_ENTER_METHOD(); + SPH_RET(0); +} + + +// Renames a table from one name to another from alter table call. +// +// If you do not implement this, the default rename_table() is called from +// handler.cc and it will delete all files with the file extentions returned +// by bas_ext(). +// +// Called from sql_table.cc by mysql_rename_table(). +int ha_sphinx::rename_table ( const char *, const char * ) +{ + SPH_ENTER_METHOD(); + SPH_RET(0); +} + + +// Given a starting key, and an ending key estimate the number of rows that +// will exist between the two. end_key may be empty which in case determine +// if start_key matches any rows. +// +// Called from opt_range.cc by check_quick_keys(). +ha_rows ha_sphinx::records_in_range ( uint, key_range *, key_range * ) +{ + SPH_ENTER_METHOD(); + SPH_RET(3); // low number to force index usage +} + + +static inline bool IsIntegerFieldType ( enum_field_types eType ) +{ + return eType==MYSQL_TYPE_LONG || eType==MYSQL_TYPE_LONGLONG; +} + + +// 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 +// the table. Also, the FRM file will have already been created so adjusting +// create_info will not do you any good. You can overwrite the frm file at this +// point if you wish to change the table definition, but there are no methods +// currently provided for doing that. +// +// Called from handle.cc by ha_create_table(). +int ha_sphinx::create ( const char * name, TABLE * table, HA_CREATE_INFO * ) +{ + SPH_ENTER_METHOD(); + char sError[256]; + + if ( !ParseUrl ( NULL, table, true ) ) + SPH_RET(-1); + + for ( ;; ) + { + // check system fields (count and types) + if ( table->s->fieldsfield[0]->type() ) || !((Field_num *)table->field[0])->unsigned_flag ) + { + my_snprintf ( sError, sizeof(sError), "%s: 1st column (docid) MUST be unsigned integer or bigint", name ); + break; + } + + if ( !IsIntegerFieldType ( table->field[1]->type() ) ) + { + my_snprintf ( sError, sizeof(sError), "%s: 2nd column (weight) MUST be integer or bigint", name ); + break; + } + + enum_field_types f2 = table->field[2]->type(); + if ( f2!=MYSQL_TYPE_VARCHAR + && f2!=MYSQL_TYPE_BLOB && f2!=MYSQL_TYPE_MEDIUM_BLOB && f2!=MYSQL_TYPE_LONG_BLOB && f2!=MYSQL_TYPE_TINY_BLOB ) + { + my_snprintf ( sError, sizeof(sError), "%s: 3rd column (search query) MUST be varchar or text", name ); + break; + } + + // check attributes + int i; + for ( i=3; i<(int)table->s->fields; i++ ) + { + enum_field_types eType = table->field[i]->type(); + if ( eType!=MYSQL_TYPE_TIMESTAMP && !IsIntegerFieldType(eType) && eType!=MYSQL_TYPE_VARCHAR && eType!=MYSQL_TYPE_FLOAT ) + { + my_snprintf ( sError, sizeof(sError), "%s: %dth column (attribute %s) MUST be integer, bigint, timestamp, varchar, or float", + name, i+1, table->field[i]->field_name ); + break; + } + } + + if ( i!=(int)table->s->fields ) + break; + + // check index + if ( + table->s->keys!=1 || + table->key_info[0].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", + name, table->field[2]->field_name ); + break; + } + + // all good + sError[0] = '\0'; + break; + } + if ( sError[0] ) + { + my_error ( ER_CANT_CREATE_TABLE, MYF(0), sError, -1 ); + SPH_RET(-1); + } + + SPH_RET(0); +} + +//// show functions + +#if MYSQL_VERSION_ID<50100 +#define SHOW_VAR_FUNC_BUFF_SIZE 1024 +#endif + +CSphSEStats * sphinx_get_stats ( THD * thd, SHOW_VAR * out ) +{ +#if MYSQL_VERSION_ID>50100 + if ( sphinx_hton_ptr ) + { + CSphSEThreadData *pTls = (CSphSEThreadData *) *thd_ha_data ( thd, sphinx_hton_ptr ); + + if ( pTls && pTls->m_bStats ) + return &pTls->m_tStats; + } +#else + CSphSEThreadData *pTls = (CSphSEThreadData *) thd->ha_data[sphinx_hton.slot]; + if ( pTls && pTls->m_bStats ) + return &pTls->m_tStats; +#endif + + out->type = SHOW_CHAR; + out->value = ""; + return 0; +} + +int sphinx_showfunc_total ( THD * thd, SHOW_VAR * out, char * ) +{ + CSphSEStats * pStats = sphinx_get_stats ( thd, out ); + if ( pStats ) + { + out->type = SHOW_INT; + out->value = (char *) &pStats->m_iMatchesTotal; + } + return 0; +} + +int sphinx_showfunc_total_found ( THD * thd, SHOW_VAR * out, char * ) +{ + CSphSEStats * pStats = sphinx_get_stats ( thd, out ); + if ( pStats ) + { + out->type = SHOW_INT; + out->value = (char *) &pStats->m_iMatchesFound; + } + return 0; +} + +int sphinx_showfunc_time ( THD * thd, SHOW_VAR * out, char * ) +{ + CSphSEStats * pStats = sphinx_get_stats ( thd, out ); + if ( pStats ) + { + out->type = SHOW_INT; + out->value = (char *) &pStats->m_iQueryMsec; + } + return 0; +} + +int sphinx_showfunc_word_count ( THD * thd, SHOW_VAR * out, char * ) +{ + CSphSEStats * pStats = sphinx_get_stats ( thd, out ); + if ( pStats ) + { + out->type = SHOW_INT; + out->value = (char *) &pStats->m_iWords; + } + return 0; +} + +int sphinx_showfunc_words ( THD * thd, SHOW_VAR * out, char * sBuffer ) +{ +#if MYSQL_VERSION_ID>50100 + if ( sphinx_hton_ptr ) + { + CSphSEThreadData * pTls = (CSphSEThreadData *) *thd_ha_data ( thd, sphinx_hton_ptr ); +#else + { + CSphSEThreadData * pTls = (CSphSEThreadData *) thd->ha_data[sphinx_hton.slot]; +#endif + if ( pTls && pTls->m_bStats ) + { + CSphSEStats * pStats = &pTls->m_tStats; + if ( pStats && pStats->m_iWords ) + { + uint uBuffLen = 0; + + out->type = SHOW_CHAR; + out->value = sBuffer; + + // the following is partially based on code in sphinx_show_status() + sBuffer[0] = 0; + for ( int i=0; im_iWords; i++ ) + { + CSphSEWordStats & tWord = pStats->m_dWords[i]; + uBuffLen = my_snprintf ( sBuffer, SHOW_VAR_FUNC_BUFF_SIZE, "%s%s:%d:%d ", sBuffer, + tWord.m_sWord, tWord.m_iDocs, tWord.m_iHits ); + } + + if ( uBuffLen > 0 ) + { + // trim last space + sBuffer [ --uBuffLen ] = 0; + + if ( pTls->m_pQueryCharset ) + { + // String::c_ptr() will nul-terminate the buffer. + // + // NOTE: It's not entirely clear whether this conversion is necessary at all. + + String sConvert; + uint iErrors; + sConvert.copy ( sBuffer, uBuffLen, pTls->m_pQueryCharset, system_charset_info, &iErrors ); + memcpy ( sBuffer, sConvert.c_ptr(), sConvert.length() + 1 ); + } + } + + return 0; + } + } + } + + out->type = SHOW_CHAR; + out->value = ""; + return 0; +} + +int sphinx_showfunc_error ( THD * thd, SHOW_VAR * out, char * ) +{ + CSphSEStats * pStats = sphinx_get_stats ( thd, out ); + if ( pStats && pStats->m_bLastError ) + { + out->type = SHOW_CHAR; + out->value = pStats->m_sLastMessage; + } + return 0; +} + +#if MYSQL_VERSION_ID>50100 +struct st_mysql_storage_engine sphinx_storage_engine = +{ + MYSQL_HANDLERTON_INTERFACE_VERSION +}; + +struct st_mysql_show_var sphinx_status_vars[] = +{ + {"sphinx_total", (char *)sphinx_showfunc_total, SHOW_FUNC}, + {"sphinx_total_found", (char *)sphinx_showfunc_total_found, SHOW_FUNC}, + {"sphinx_time", (char *)sphinx_showfunc_time, SHOW_FUNC}, + {"sphinx_word_count", (char *)sphinx_showfunc_word_count, SHOW_FUNC}, + {"sphinx_words", (char *)sphinx_showfunc_words, SHOW_FUNC}, + {"sphinx_error", (char *)sphinx_showfunc_error, SHOW_FUNC}, + {0, 0, (enum_mysql_show_type)0} +}; + + +mysql_declare_plugin(sphinx) +{ + MYSQL_STORAGE_ENGINE_PLUGIN, + &sphinx_storage_engine, + sphinx_hton_name, + "Sphinx developers", + sphinx_hton_comment, + PLUGIN_LICENSE_GPL, + sphinx_init_func, // Plugin Init + sphinx_done_func, // Plugin Deinit + 0x0001, // 0.1 + sphinx_status_vars, + NULL, + NULL +} +mysql_declare_plugin_end; + +#endif // >50100 + +// +// $Id$ +// diff --git a/ha_sphinx.h b/ha_sphinx.h new file mode 100644 index 00000000000..b514e2a669c --- /dev/null +++ b/ha_sphinx.h @@ -0,0 +1,164 @@ +// +// $Id$ +// + +#ifdef USE_PRAGMA_INTERFACE +#pragma interface // gcc class implementation +#endif + + +#if MYSQL_VERSION_ID>50100 +#define TABLE_ARG st_table_share +#else +#define TABLE_ARG st_table +#endif + + +#if MYSQL_VERSION_ID>=50120 +typedef uchar byte; +#endif + + +/// forward decls +class THD; +struct CSphReqQuery; +struct CSphSEShare; +struct CSphSEAttr; +struct CSphSEStats; +struct CSphSEThreadData; + +/// Sphinx SE handler class +class ha_sphinx : public handler +{ +protected: + THR_LOCK_DATA m_tLock; ///< MySQL lock + + CSphSEShare * m_pShare; ///< shared lock info + + uint m_iMatchesTotal; + uint m_iCurrentPos; + const byte * m_pCurrentKey; + uint m_iCurrentKeyLen; + + char * m_pResponse; ///< searchd response storage + char * m_pResponseEnd; ///< searchd response storage end (points to wilderness!) + char * m_pCur; ///< current position into response + bool m_bUnpackError; ///< any errors while unpacking response + +public: +#if MYSQL_VERSION_ID<50100 + ha_sphinx ( TABLE_ARG * table_arg ); +#else + ha_sphinx ( handlerton * hton, TABLE_ARG * table_arg ); +#endif + ~ha_sphinx () {} + + const char * table_type () const { return "SPHINX"; } ///< SE name for display purposes + const char * index_type ( uint ) { return "HASH"; } ///< index type name for display purposes + const char ** bas_ext () const; ///< my file extensions + + #if MYSQL_VERSION_ID>50100 + ulonglong table_flags () const { return HA_CAN_INDEX_BLOBS; } ///< bitmap of implemented flags (see handler.h for more info) + #else + ulong table_flags () const { return HA_CAN_INDEX_BLOBS; } ///< bitmap of implemented flags (see handler.h for more info) + #endif + + ulong index_flags ( uint, uint, bool ) const { return 0; } ///< bitmap of flags that says how SE implements indexes + uint max_supported_record_length () const { return HA_MAX_REC_LENGTH; } + uint max_supported_keys () const { return 1; } + uint max_supported_key_parts () const { return 1; } + uint max_supported_key_length () const { return MAX_KEY_LENGTH; } + uint max_supported_key_part_length () const { return MAX_KEY_LENGTH; } + + #if MYSQL_VERSION_ID>50100 + virtual double scan_time () { return (double)( stats.records+stats.deleted )/20.0 + 10; } ///< called in test_quick_select to determine if indexes should be used + #else + virtual double scan_time () { return (double)( records+deleted )/20.0 + 10; } ///< called in test_quick_select to determine if indexes should be used + #endif + + virtual double read_time ( ha_rows rows ) { return (double)rows/20.0 + 1; } ///< index read time estimate + +public: + int open ( const char * name, int mode, uint test_if_locked ); + int close (); + + int write_row ( uchar * buf ); + int update_row ( const uchar * old_data, uchar * new_data ); + int delete_row ( const uchar * buf ); + + int index_init ( uint keynr, bool sorted ); // 5.1.x + int index_init ( uint keynr ) { return index_init ( keynr, false ); } // 5.0.x + + int index_end (); + int index_read ( byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag ); + int index_read_idx ( byte * buf, uint idx, const byte * key, uint key_len, enum ha_rkey_function find_flag ); + int index_next ( byte * buf ); + int index_next_same ( byte * buf, const byte * key, uint keylen ); + int index_prev ( byte * buf ); + int index_first ( byte * buf ); + int index_last ( byte * buf ); + + int get_rec ( byte * buf, const byte * key, uint keylen ); + + int rnd_init ( bool scan ); + int rnd_end (); + int rnd_next ( byte * buf ); + int rnd_pos ( byte * buf, byte * pos ); + void position ( const byte * record ); + +#if MYSQL_VERSION_ID>=50030 + int info ( uint ); +#else + void info ( uint ); +#endif + + int reset(); + int external_lock ( THD * thd, int lock_type ); + int delete_all_rows (); + ha_rows records_in_range ( uint inx, key_range * min_key, key_range * max_key ); + + int delete_table ( const char * from ); + int rename_table ( const char * from, const char * to ); + int create ( const char * name, TABLE * form, HA_CREATE_INFO * create_info ); + + THR_LOCK_DATA **store_lock ( THD * thd, THR_LOCK_DATA ** to, enum thr_lock_type lock_type ); + +public: + virtual const COND * cond_push ( const COND *cond ); + virtual void cond_pop (); + +private: + uint32 m_iFields; + char ** m_dFields; + + uint32 m_iAttrs; + CSphSEAttr * m_dAttrs; + int m_bId64; + + int * m_dUnboundFields; + +private: + int ConnectToSearchd ( const char * sQueryHost, int iQueryPort ); + + uint32 UnpackDword (); + char * UnpackString (); + bool UnpackSchema (); + bool UnpackStats ( CSphSEStats * pStats ); + + CSphSEThreadData * GetTls (); +}; + + +#if MYSQL_VERSION_ID < 50100 +bool sphinx_show_status ( THD * thd ); +#endif + +int sphinx_showfunc_total_found ( THD *, SHOW_VAR *, char * ); +int sphinx_showfunc_total ( THD *, SHOW_VAR *, char * ); +int sphinx_showfunc_time ( THD *, SHOW_VAR *, char * ); +int sphinx_showfunc_word_count ( THD *, SHOW_VAR *, char * ); +int sphinx_showfunc_words ( THD *, SHOW_VAR *, char * ); + +// +// $Id$ +// diff --git a/make-patch.sh b/make-patch.sh new file mode 100644 index 00000000000..6fca5838ded --- /dev/null +++ b/make-patch.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +OUT=$1 +ORIG=$2 +NEW=$3 + +if [ ! \( "$1" -a "$2" -a "$3" \) ]; then + echo "$0 " + exit 1 +fi + +FILES=' +/config/ac-macros/ha_sphinx.m4 +/configure.in +/libmysqld/Makefile.am +/sql/handler.cc +/sql/handler.h +/sql/Makefile.am +/sql/mysqld.cc +/sql/mysql_priv.h +/sql/set_var.cc +/sql/sql_lex.h +/sql/sql_parse.cc +/sql/sql_yacc.yy +/sql/structs.h +/sql/sql_show.cc +' + +rm -f $OUT +if [ -e $OUT ]; then + exit 1 +fi + +for name in $FILES; do + diff -BNru "$ORIG$name" "$NEW$name" >> $OUT +done diff --git a/plug.in b/plug.in new file mode 100644 index 00000000000..1ded1be508c --- /dev/null +++ b/plug.in @@ -0,0 +1,5 @@ +MYSQL_STORAGE_ENGINE(sphinx,, [Sphinx Storage Engine], + [Sphinx Storage Engines], [max,max-no-ndb]) +MYSQL_PLUGIN_DIRECTORY(sphinx, [storage/sphinx]) +MYSQL_PLUGIN_STATIC(sphinx, [libsphinx.a]) +MYSQL_PLUGIN_DYNAMIC(sphinx, [ha_sphinx.la]) diff --git a/snippets_udf.cc b/snippets_udf.cc new file mode 100644 index 00000000000..cf7ca1a7c97 --- /dev/null +++ b/snippets_udf.cc @@ -0,0 +1,766 @@ +// +// $Id$ +// + +// +// Copyright (c) 2001-2008, Andrew Aksyonoff. 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. You should have +// received a copy of the GPL license along with this program; if you +// did not, you can find it at http://www.gnu.org/ +// + +#include +#include +#include + +#include +#include + +#include + +#if MYSQL_VERSION_ID>50100 +#include "mysql_priv.h" +#include +#else +#include "../mysql_priv.h" +#endif + +#include +#include + +#if MYSQL_VERSION_ID>=50120 +typedef uchar byte; +#endif + +/// partially copy-pasted stuff that should be moved elsewhere + +#if UNALIGNED_RAM_ACCESS + +/// pass-through wrapper +template < typename T > inline T sphUnalignedRead ( const T & tRef ) +{ + return tRef; +} + +/// pass-through wrapper +template < typename T > void sphUnalignedWrite ( void * pPtr, const T & tVal ) +{ + *(T*)pPtr = tVal; +} + +#else + +/// unaligned read wrapper for some architectures (eg. SPARC) +template < typename T > +inline T sphUnalignedRead ( const T & tRef ) +{ + T uTmp; + byte * pSrc = (byte *) &tRef; + byte * pDst = (byte *) &uTmp; + for ( int i=0; i<(int)sizeof(T); i++ ) + *pDst++ = *pSrc++; + return uTmp; +} + +/// unaligned write wrapper for some architectures (eg. SPARC) +template < typename T > +void sphUnalignedWrite ( void * pPtr, const T & tVal ) +{ + byte * pDst = (byte *) pPtr; + byte * pSrc = (byte *) &tVal; + for ( int i=0; i<(int)sizeof(T); i++ ) + *pDst++ = *pSrc++; +} + +#endif + +#define SPHINXSE_MAX_ALLOC (16*1024*1024) + +#define SafeDelete(_arg) { if ( _arg ) delete ( _arg ); (_arg) = NULL; } +#define SafeDeleteArray(_arg) { if ( _arg ) delete [] ( _arg ); (_arg) = NULL; } + +#define Min(a,b) ((a)<(b)?(a):(b)) + +typedef unsigned int DWORD; + +inline DWORD sphF2DW ( float f ) { union { float f; uint32 d; } u; u.f = f; return u.d; } + +static char * sphDup ( const char * sSrc, int iLen=-1 ) +{ + if ( !sSrc ) + return NULL; + + if ( iLen<0 ) + iLen = strlen(sSrc); + + char * sRes = new char [ 1+iLen ]; + memcpy ( sRes, sSrc, iLen ); + sRes[iLen] = '\0'; + return sRes; +} + +static inline void sphShowErrno ( const char * sCall ) +{ + char sError[256]; + snprintf ( sError, sizeof(sError), "%s() failed: [%d] %s", sCall, errno, strerror(errno) ); + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sError ); +} + +static const bool sphReportErrors = true; + +static bool sphSend ( int iFd, const char * pBuffer, int iSize, bool bReportErrors = false ) +{ + assert ( pBuffer ); + assert ( iSize > 0 ); + + const int iResult = send ( iFd, pBuffer, iSize, 0 ); + if ( iResult != iSize ) + { + if ( bReportErrors ) sphShowErrno("send"); + return false; + } + return true; +} + +static bool sphRecv ( int iFd, char * pBuffer, int iSize, bool bReportErrors = false ) +{ + assert ( pBuffer ); + assert ( iSize > 0 ); + + while ( iSize ) + { + const int iResult = recv ( iFd, pBuffer, iSize, 0 ); + if ( iResult > 0 ) + { + iSize -= iResult; + pBuffer += iSize; + } + else if ( iResult == 0 ) + { + if ( bReportErrors ) + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), "recv() failed: disconnected" ); + return false; + } + else + { + if ( bReportErrors ) sphShowErrno("recv"); + return false; + } + } + return true; +} + +enum +{ + SPHINX_SEARCHD_PROTO = 1, + + SEARCHD_COMMAND_SEARCH = 0, + SEARCHD_COMMAND_EXCERPT = 1, + + VER_COMMAND_SEARCH = 0x116, + VER_COMMAND_EXCERPT = 0x100, +}; + +/// known answers +enum +{ + SEARCHD_OK = 0, ///< general success, command-specific reply follows + SEARCHD_ERROR = 1, ///< general failure, error message follows + SEARCHD_RETRY = 2, ///< temporary failure, error message follows, client should retry later + SEARCHD_WARNING = 3 ///< general success, warning message and command-specific reply follow +}; + +#define SPHINXSE_DEFAULT_SCHEME "sphinx" +#define SPHINXSE_DEFAULT_HOST "127.0.0.1" +#define SPHINXSE_DEFAULT_PORT 9312 +#define SPHINXSE_DEFAULT_INDEX "*" + +class CSphBuffer +{ +private: + bool m_bOverrun; + int m_iSize; + int m_iLeft; + char * m_pBuffer; + char * m_pCurrent; + +public: + CSphBuffer ( const int iSize ) + : m_bOverrun ( false ) + , m_iSize ( iSize ) + , m_iLeft ( iSize ) + { + assert ( iSize > 0 ); + m_pBuffer = new char[iSize]; + m_pCurrent = m_pBuffer; + } + + ~CSphBuffer () + { + SafeDelete ( m_pBuffer ); + } + + const char * Ptr() const { return m_pBuffer; } + + bool Finalize() + { + return !( m_bOverrun || m_iLeft != 0 || m_pCurrent - m_pBuffer != m_iSize ); + } + + void SendBytes ( const void * pBytes, int iBytes ); + + void SendWord ( short int v ) { v = ntohs(v); SendBytes ( &v, sizeof(v) ); } + void SendInt ( int v ) { v = ntohl(v); SendBytes ( &v, sizeof(v) ); } + void SendDword ( DWORD v ) { v = ntohl(v) ;SendBytes ( &v, sizeof(v) ); } + void SendUint64 ( ulonglong v ) { SendDword ( uint(v>>32) ); SendDword ( uint(v&0xFFFFFFFFUL) ); } + void SendString ( const char * v ) { SendString ( v, strlen(v) ); } + void SendString ( const char * v, int iLen ) { SendDword(iLen); SendBytes ( v, iLen ); } + void SendFloat ( float v ) { SendDword ( sphF2DW(v) ); } +}; + +void CSphBuffer::SendBytes ( const void * pBytes, int iBytes ) +{ + if ( m_iLeft < iBytes ) + { + m_bOverrun = true; + return; + } + + memcpy ( m_pCurrent, pBytes, iBytes ); + + m_pCurrent += iBytes; + m_iLeft -= iBytes; +} + +struct CSphUrl +{ + char * m_sBuffer; + char * m_sFormatted; + + char * m_sScheme; + char * m_sHost; + char * m_sIndex; + + int m_iPort; + + CSphUrl() + : m_sBuffer ( NULL ) + , m_sFormatted ( NULL ) + , m_sScheme ( SPHINXSE_DEFAULT_SCHEME ) + , m_sHost ( SPHINXSE_DEFAULT_HOST ) + , m_sIndex ( SPHINXSE_DEFAULT_INDEX ) + , m_iPort ( SPHINXSE_DEFAULT_PORT ) + {} + + ~CSphUrl() + { + SafeDeleteArray ( m_sFormatted ); + SafeDeleteArray ( m_sBuffer ); + } + + bool Parse ( const char * sUrl, int iLen ); + int Connect(); + const char * Format(); +}; + +const char * CSphUrl::Format() +{ + if ( !m_sFormatted ) + { + int iSize = 15 + strlen(m_sHost) + strlen(m_sIndex); + m_sFormatted = new char [ iSize ]; + if ( m_iPort ) + snprintf ( m_sFormatted, iSize, "inet://%s:%d/%s", m_sHost, m_iPort, m_sIndex ); + else + snprintf ( m_sFormatted, iSize, "unix://%s/%s", m_sHost, m_sIndex ); + } + return m_sFormatted; +} + +// the following scheme variants are recognized +// +// inet://host/index +// inet://host:port/index +// unix://unix/domain/socket:index +// unix://unix/domain/socket +bool CSphUrl::Parse ( const char * sUrl, int iLen ) +{ + bool bOk = true; + while ( iLen ) + { + bOk = false; + + m_sBuffer = sphDup ( sUrl, iLen ); + m_sScheme = m_sBuffer; + + m_sHost = strstr ( m_sBuffer, "://" ); + if ( !m_sHost ) + break; + m_sHost[0] = '\0'; + m_sHost += 2; + + if ( !strcmp ( m_sScheme, "unix" ) ) + { + // unix-domain socket + m_iPort = 0; + if (!( m_sIndex = strrchr ( m_sHost, ':' ) )) + m_sIndex = SPHINXSE_DEFAULT_INDEX; + else + { + *m_sIndex++ = '\0'; + if ( !*m_sIndex ) + m_sIndex = SPHINXSE_DEFAULT_INDEX; + } + bOk = true; + break; + } + if( strcmp ( m_sScheme, "sphinx" ) != 0 && strcmp ( m_sScheme, "inet" ) != 0 ) + break; + + // inet + m_sHost++; + char * sPort = strchr ( m_sHost, ':' ); + if ( sPort ) + { + *sPort++ = '\0'; + if ( *sPort ) + { + m_sIndex = strchr ( sPort, '/' ); + if ( m_sIndex ) + *m_sIndex++ = '\0'; + else + m_sIndex = SPHINXSE_DEFAULT_INDEX; + + m_iPort = atoi(sPort); + if ( !m_iPort ) + m_iPort = SPHINXSE_DEFAULT_PORT; + } + } else + { + m_sIndex = strchr ( m_sHost, '/' ); + if ( m_sIndex ) + *m_sIndex++ = '\0'; + else + m_sIndex = SPHINXSE_DEFAULT_INDEX; + } + + bOk = true; + break; + } + + return bOk; +} + +int CSphUrl::Connect() +{ + struct sockaddr_in sin; +#ifndef __WIN__ + struct sockaddr_un saun; +#endif + + int iDomain = 0; + int iSockaddrSize = 0; + struct sockaddr * pSockaddr = NULL; + + in_addr_t ip_addr; + + if ( m_iPort ) + { + iDomain = AF_INET; + iSockaddrSize = sizeof(sin); + pSockaddr = (struct sockaddr *) &sin; + + memset ( &sin, 0, sizeof(sin) ); + sin.sin_family = AF_INET; + sin.sin_port = htons(m_iPort); + + // resolve address + if ( (int)( ip_addr=inet_addr(m_sHost) ) != (int)INADDR_NONE ) + memcpy ( &sin.sin_addr, &ip_addr, sizeof(ip_addr) ); + else + { + int tmp_errno; + struct hostent tmp_hostent, *hp; + char buff2 [ GETHOSTBYNAME_BUFF_SIZE ]; + + hp = my_gethostbyname_r ( m_sHost, &tmp_hostent, + buff2, sizeof(buff2), &tmp_errno ); + if ( !hp ) + { + my_gethostbyname_r_free(); + + char sError[256]; + snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", m_sHost ); + + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); + return -1; + } + + memcpy ( &sin.sin_addr, hp->h_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); + my_gethostbyname_r_free(); + } + } + else + { +#ifndef __WIN__ + iDomain = AF_UNIX; + iSockaddrSize = sizeof(saun); + pSockaddr = (struct sockaddr *) &saun; + + memset ( &saun, 0, sizeof(saun) ); + saun.sun_family = AF_UNIX; + strncpy ( saun.sun_path, m_sHost, sizeof(saun.sun_path)-1 ); +#else + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), "Unix-domain sockets are not supported on Windows" ); + return -1; +#endif + } + + // connect to searchd and exchange versions + uint uServerVersion; + uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); + int iSocket = -1; + char * pError = NULL; + do + { + iSocket = socket ( iDomain, SOCK_STREAM, 0 ); + if ( iSocket == -1 ) + { + pError = "Failed to create client socket"; + break; + } + + if ( connect ( iSocket, pSockaddr, iSockaddrSize ) == -1) + { + pError = "Failed to connect to searchd"; + break; + } + + if ( !sphRecv ( iSocket, (char *)&uServerVersion, sizeof(uServerVersion) ) ) + { + pError = "Failed to receive searchd version"; + break; + } + + if ( !sphSend ( iSocket, (char *)&uClientVersion, sizeof(uClientVersion) ) ) + { + pError = "Failed to send client version"; + break; + } + } + while(0); + + // fixme: compare versions? + + if ( pError ) + { + char sError[1024]; + snprintf ( sError, sizeof(sError), "%s [%d] %s", Format(), errno, strerror(errno) ); + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); + + if ( iSocket != -1 ) + close ( iSocket ); + + return -1; + } + + return iSocket; +} + +struct CSphResponse +{ + char * m_pBuffer; + char * m_pBody; + + CSphResponse () + : m_pBuffer ( NULL ) + , m_pBody ( NULL ) + {} + + CSphResponse ( DWORD uSize ) + : m_pBody ( NULL ) + { + m_pBuffer = new char[uSize]; + } + + ~CSphResponse () + { + SafeDeleteArray ( m_pBuffer ); + } + + static CSphResponse * Read ( int iSocket, int iClientVersion ); +}; + +CSphResponse * +CSphResponse::Read ( int iSocket, int iClientVersion ) +{ + char sHeader[8]; + if ( !sphRecv ( iSocket, sHeader, sizeof(sHeader) ) ) + return NULL; + + int iStatus = ntohs ( sphUnalignedRead ( *(short int *) &sHeader[0] ) ); + int iVersion = ntohs ( sphUnalignedRead ( *(short int *) &sHeader[2] ) ); + DWORD uLength = ntohl ( sphUnalignedRead ( *(DWORD *) &sHeader[4] ) ); + + if ( iVersion < iClientVersion ) // fixme: warn + ; + + if ( uLength <= SPHINXSE_MAX_ALLOC ) + { + CSphResponse * pResponse = new CSphResponse ( uLength ); + if ( !sphRecv ( iSocket, pResponse->m_pBuffer, uLength ) ) + { + SafeDelete ( pResponse ); + return NULL; + } + + pResponse->m_pBody = pResponse->m_pBuffer; + if ( iStatus != SEARCHD_OK ) + { + DWORD uSize = ntohl ( *(DWORD *)pResponse->m_pBuffer ); + if ( iStatus == SEARCHD_WARNING ) + pResponse->m_pBody += uSize; // fixme: report the warning somehow + else + { + char * sMessage = sphDup ( pResponse->m_pBuffer + sizeof(DWORD), uSize ); + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sMessage ); + SafeDelete ( sMessage ); + SafeDelete ( pResponse ); + return NULL; + } + } + return pResponse; + } + return NULL; +} + +/// udf + +extern "C" +{ + my_bool sphinx_snippets_init ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sMessage ); + void sphinx_snippets_deinit ( UDF_INIT * pUDF ); + char * sphinx_snippets ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sResult, unsigned long * pLength, char * pIsNull, char * sError ); +}; + +#define MAX_MESSAGE_LENGTH 255 +#define MAX_RESULT_LENGTH 255 + +struct CSphSnippets +{ + CSphUrl m_tUrl; + CSphResponse * m_pResponse; + + int m_iBeforeMatch; + int m_iAfterMatch; + int m_iChunkSeparator; + int m_iLimit; + int m_iAround; + int m_iFlags; + + CSphSnippets() + : m_pResponse(NULL) + , m_iBeforeMatch(0) + , m_iAfterMatch(0) + , m_iChunkSeparator(0) + // defaults + , m_iLimit(256) + , m_iAround(5) + , m_iFlags(1) + { + } + + ~CSphSnippets() + { + SafeDelete ( m_pResponse ); + } +}; + +#define KEYWORD(NAME) else if ( strncmp ( NAME, pArgs->attributes[i], pArgs->attribute_lengths[i] ) == 0 ) + +#define CHECK_TYPE(TYPE) \ + if ( pArgs->arg_type[i] != TYPE ) \ + { \ + snprintf ( sMessage, MAX_MESSAGE_LENGTH, \ + "%.*s argument must be a string", \ + (int)pArgs->attribute_lengths[i], \ + pArgs->attributes[i] ); \ + bFail = true; \ + break; \ + } \ + if ( TYPE == STRING_RESULT && !pArgs->args[i] ) \ + { \ + snprintf ( sMessage, MAX_MESSAGE_LENGTH, \ + "%.*s argument must be constant (and not NULL)", \ + (int)pArgs->attribute_lengths[i], \ + pArgs->attributes[i] ); \ + bFail = true; \ + break; \ + } + +#define STRING CHECK_TYPE(STRING_RESULT) +#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 ) +{ + if ( pArgs->arg_count < 3 ) + { + strncpy ( sMessage, "insufficient arguments", MAX_MESSAGE_LENGTH ); + return 1; + } + + bool bFail = false; + CSphSnippets * pOpts = new CSphSnippets; + for ( uint i = 0; i < pArgs->arg_count; i++ ) + { + if ( i < 3 ) + { + if ( pArgs->arg_type[i] != STRING_RESULT ) + { + strncpy ( sMessage, "first three arguments must be of string type", MAX_MESSAGE_LENGTH ); + bFail = true; + break; + } + } + KEYWORD("sphinx") + { + STRING; + if ( !pOpts->m_tUrl.Parse ( pArgs->args[i], pArgs->lengths[i] ) ) + { + strncpy ( sMessage, "failed to parse connection string", MAX_MESSAGE_LENGTH ); + bFail = true; + break; + } + } + KEYWORD("before_match") { STRING; pOpts->m_iBeforeMatch = i; } + KEYWORD("after_match") { STRING; pOpts->m_iAfterMatch = i; } + KEYWORD("chunk_separator") { STRING; pOpts->m_iChunkSeparator = i; } + KEYWORD("limit") { INT; pOpts->m_iLimit = iValue; } + KEYWORD("around") { INT; pOpts->m_iAround = iValue; } + KEYWORD("exact_phrase") { INT; if ( iValue ) pOpts->m_iFlags |= 2; } + KEYWORD("single_passage") { INT; if ( iValue ) pOpts->m_iFlags |= 4; } + KEYWORD("use_boundaries") { INT; if ( iValue ) pOpts->m_iFlags |= 8; } + KEYWORD("weight_order") { INT; if ( iValue ) pOpts->m_iFlags |= 16; } + else + { + snprintf ( sMessage, MAX_MESSAGE_LENGTH, "unrecognized argument: %.*s", + (int)pArgs->attribute_lengths[i], pArgs->attributes[i] ); + bFail = true; + break; + } + } + + if ( bFail ) + { + SafeDelete ( pOpts ); + return 1; + } + pUDF->ptr = (char *)pOpts; + return 0; +} + +#undef STRING +#undef INT +#undef KEYWORD +#undef CHECK_TYPE + +#define ARG(i) pArgs->args[i], pArgs->lengths[i] +#define ARG_LEN(VAR, LEN) ( VAR ? pArgs->lengths[VAR] : LEN ) + +#define SEND_STRING(INDEX, DEFAULT) \ + if ( INDEX ) \ + tBuffer.SendString ( ARG(INDEX) ); \ + else \ + tBuffer.SendString ( DEFAULT, sizeof(DEFAULT) - 1 ); + + +char * sphinx_snippets ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sResult, unsigned long * pLength, char * pIsNull, char * pError ) +{ + CSphSnippets * pOpts = (CSphSnippets *)pUDF->ptr; + assert ( pOpts ); + + if ( !pArgs->args[0] || !pArgs->args[1] || !pArgs->args[2] ) + { + *pIsNull = 1; + return sResult; + } + + const int iSize = + 8 + // header + 8 + + 4 + pArgs->lengths[1] + // index + 4 + pArgs->lengths[2] + // words + 4 + ARG_LEN ( pOpts->m_iBeforeMatch, 3 ) + + 4 + ARG_LEN ( pOpts->m_iAfterMatch, 4 ) + + 4 + ARG_LEN ( pOpts->m_iChunkSeparator, 5 ) + + 12 + + 4 + pArgs->lengths[0]; // document + + CSphBuffer tBuffer(iSize); + + tBuffer.SendWord ( SEARCHD_COMMAND_EXCERPT ); + tBuffer.SendWord ( VER_COMMAND_EXCERPT ); + tBuffer.SendDword ( iSize - 8 ); + + tBuffer.SendDword ( 0 ); + tBuffer.SendDword ( pOpts->m_iFlags ); + + tBuffer.SendString ( ARG(1) ); // index + tBuffer.SendString ( ARG(2) ); // words + + SEND_STRING ( pOpts->m_iBeforeMatch, "" ); + SEND_STRING ( pOpts->m_iAfterMatch, "" ); + SEND_STRING ( pOpts->m_iChunkSeparator, " ... " ); + + tBuffer.SendInt ( pOpts->m_iLimit ); + tBuffer.SendInt ( pOpts->m_iAround ); + + // single document + tBuffer.SendInt ( 1 ); + tBuffer.SendString ( ARG(0) ); + + int iSocket = -1; + do + { + if ( !tBuffer.Finalize() ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: failed to build request" ); + break; + } + + iSocket = pOpts->m_tUrl.Connect(); + if ( iSocket == -1 ) break; + if ( !sphSend ( iSocket, tBuffer.Ptr(), iSize, sphReportErrors ) ) break; + + CSphResponse * pResponse = CSphResponse::Read ( iSocket, 0x100 ); + if ( !pResponse ) break; + + close ( iSocket ); + pOpts->m_pResponse = pResponse; + *pLength = ntohl( *(DWORD *)pResponse->m_pBody ); + return pResponse->m_pBody + sizeof(DWORD); + } + while(0); + + if ( iSocket != -1 ) + close ( iSocket ); + + *pError = 1; + return sResult; +} + +#undef SEND_STRING +#undef ARG_LEN +#undef ARG + +void sphinx_snippets_deinit ( UDF_INIT * pUDF ) +{ + CSphSnippets * pOpts = (CSphSnippets *)pUDF->ptr; + SafeDelete ( pOpts ); +} + +// +// $Id$ +// diff --git a/sphinx.5.0.22.diff b/sphinx.5.0.22.diff new file mode 100644 index 00000000000..7dd4ebf1410 --- /dev/null +++ b/sphinx.5.0.22.diff @@ -0,0 +1,284 @@ +diff -B -N -r -u mysql-5.0.22/config/ac-macros/ha_sphinx.m4 mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 +--- mysql-5.0.22/config/ac-macros/ha_sphinx.m4 1970-01-01 01:00:00.000000000 +0100 ++++ mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 2006-06-06 19:49:38.000000000 +0200 +@@ -0,0 +1,30 @@ ++dnl --------------------------------------------------------------------------- ++dnl Macro: MYSQL_CHECK_EXAMPLEDB ++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used ++dnl --------------------------------------------------------------------------- ++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [ ++ AC_ARG_WITH([sphinx-storage-engine], ++ [ ++ --with-sphinx-storage-engine ++ Enable the Sphinx Storage Engine], ++ [sphinxdb="$withval"], ++ [sphinxdb=no]) ++ AC_MSG_CHECKING([for example storage engine]) ++ ++ case "$sphinxdb" in ++ yes ) ++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine]) ++ AC_MSG_RESULT([yes]) ++ [sphinxdb=yes] ++ ;; ++ * ) ++ AC_MSG_RESULT([no]) ++ [sphinxdb=no] ++ ;; ++ esac ++ ++]) ++dnl --------------------------------------------------------------------------- ++dnl END OF MYSQL_CHECK_EXAMPLE SECTION ++dnl --------------------------------------------------------------------------- ++ +diff -B -N -r -u mysql-5.0.22/configure.in mysql-5.0.22.sx/configure.in +--- mysql-5.0.22/configure.in 2006-05-25 10:56:45.000000000 +0200 ++++ mysql-5.0.22.sx/configure.in 2006-06-06 19:49:38.000000000 +0200 +@@ -41,6 +41,7 @@ + sinclude(config/ac-macros/ha_berkeley.m4) + sinclude(config/ac-macros/ha_blackhole.m4) + sinclude(config/ac-macros/ha_example.m4) ++sinclude(config/ac-macros/ha_sphinx.m4) + sinclude(config/ac-macros/ha_federated.m4) + sinclude(config/ac-macros/ha_innodb.m4) + sinclude(config/ac-macros/ha_ndbcluster.m4) +@@ -2450,6 +2451,7 @@ + MYSQL_CHECK_BDB + MYSQL_CHECK_INNODB + MYSQL_CHECK_EXAMPLEDB ++MYSQL_CHECK_SPHINXDB + MYSQL_CHECK_ARCHIVEDB + MYSQL_CHECK_CSVDB + MYSQL_CHECK_BLACKHOLEDB +diff -B -N -r -u mysql-5.0.22/libmysqld/Makefile.am mysql-5.0.22.sx/libmysqld/Makefile.am +--- mysql-5.0.22/libmysqld/Makefile.am 2006-05-25 10:56:55.000000000 +0200 ++++ mysql-5.0.22.sx/libmysqld/Makefile.am 2006-06-06 19:49:38.000000000 +0200 +@@ -27,7 +27,7 @@ + -DSHAREDIR="\"$(MYSQLSHAREdir)\"" + INCLUDES= @bdb_includes@ \ + -I$(top_builddir)/include -I$(top_srcdir)/include \ +- -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \ ++ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/sql/sphinx \ + -I$(top_srcdir)/regex \ + $(openssl_includes) $(yassl_includes) @ZLIB_INCLUDES@ + +@@ -38,6 +38,7 @@ + libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ + my_time.c + sqlexamplessources = ha_example.cc ha_tina.cc ++sqlsphinxsources = ha_sphinx.cc + + noinst_HEADERS = embedded_priv.h emb_qcache.h + +@@ -65,7 +66,7 @@ + parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ + ha_blackhole.cc ha_archive.cc my_user.c + +-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) ++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources) + libmysqld_a_SOURCES= + + # automake misses these +@@ -133,12 +134,16 @@ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ + done; \ ++ for f in $(sqlsphinxsources); do \ ++ rm -f $$f; \ ++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \ ++ done; \ + rm -f client_settings.h; \ + @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h + + + clean-local: +- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ ++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \ + $(top_srcdir)/linked_libmysqld_sources; \ + rm -f client_settings.h + +diff -B -N -r -u mysql-5.0.22/sql/handler.cc mysql-5.0.22.sx/sql/handler.cc +--- mysql-5.0.22/sql/handler.cc 2006-05-25 10:56:42.000000000 +0200 ++++ mysql-5.0.22.sx/sql/handler.cc 2006-06-06 19:49:38.000000000 +0200 +@@ -78,6 +78,15 @@ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + HTON_NO_FLAGS }; + #endif ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++extern handlerton sphinx_hton; ++#else ++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine", ++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL, ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ++ HTON_NO_FLAGS }; ++#endif + #ifdef HAVE_INNOBASE_DB + #include "ha_innodb.h" + extern handlerton innobase_hton; +@@ -147,6 +156,7 @@ + &example_hton, + &archive_hton, + &tina_hton, ++ &sphinx_hton, + &ndbcluster_hton, + &federated_hton, + &myisammrg_hton, +@@ -345,6 +355,12 @@ + return new (alloc) ha_tina(table); + return NULL; + #endif ++#ifdef HAVE_SPHINX_DB ++ case DB_TYPE_SPHINX_DB: ++ if (have_sphinx_db == SHOW_OPTION_YES) ++ return new (alloc) ha_sphinx(table); ++ return NULL; ++#endif + #ifdef HAVE_NDBCLUSTER_DB + case DB_TYPE_NDBCLUSTER: + if (have_ndbcluster == SHOW_OPTION_YES) +diff -B -N -r -u mysql-5.0.22/sql/handler.h mysql-5.0.22.sx/sql/handler.h +--- mysql-5.0.22/sql/handler.h 2006-05-25 10:56:55.000000000 +0200 ++++ mysql-5.0.22.sx/sql/handler.h 2006-06-06 19:49:38.000000000 +0200 +@@ -183,8 +183,9 @@ + DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, + DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER, + DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB, +- DB_TYPE_FEDERATED_DB, ++ DB_TYPE_FEDERATED_DB, + DB_TYPE_BLACKHOLE_DB, ++ DB_TYPE_SPHINX_DB, + DB_TYPE_DEFAULT // Must be last + }; + +diff -B -N -r -u mysql-5.0.22/sql/Makefile.am mysql-5.0.22.sx/sql/Makefile.am +--- mysql-5.0.22/sql/Makefile.am 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/Makefile.am 2006-06-06 19:49:38.000000000 +0200 +@@ -66,6 +66,7 @@ + sql_array.h sql_cursor.h \ + examples/ha_example.h ha_archive.h \ + examples/ha_tina.h ha_blackhole.h \ ++ sphinx/ha_sphinx.h \ + ha_federated.h + mysqld_SOURCES = sql_lex.cc sql_handler.cc \ + item.cc item_sum.cc item_buff.cc item_func.cc \ +@@ -102,6 +103,7 @@ + sp_cache.cc parse_file.cc sql_trigger.cc \ + examples/ha_example.cc ha_archive.cc \ + examples/ha_tina.cc ha_blackhole.cc \ ++ sphinx/ha_sphinx.cc \ + ha_federated.cc + + gen_lex_hash_SOURCES = gen_lex_hash.cc +diff -B -N -r -u mysql-5.0.22/sql/mysqld.cc mysql-5.0.22.sx/sql/mysqld.cc +--- mysql-5.0.22/sql/mysqld.cc 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/mysqld.cc 2006-06-06 19:49:38.000000000 +0200 +@@ -6420,6 +6420,11 @@ + #else + have_csv_db= SHOW_OPTION_NO; + #endif ++#ifdef HAVE_SPHINX_DB ++ have_sphinx_db= SHOW_OPTION_YES; ++#else ++ have_sphinx_db= SHOW_OPTION_NO; ++#endif + #ifdef HAVE_NDBCLUSTER_DB + have_ndbcluster=SHOW_OPTION_DISABLED; + #else +@@ -7457,6 +7462,7 @@ + #undef have_example_db + #undef have_archive_db + #undef have_csv_db ++#undef have_sphinx_db + #undef have_federated_db + #undef have_partition_db + #undef have_blackhole_db +@@ -7467,6 +7473,7 @@ + SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; ++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO; +diff -B -N -r -u mysql-5.0.22/sql/mysql_priv.h mysql-5.0.22.sx/sql/mysql_priv.h +--- mysql-5.0.22/sql/mysql_priv.h 2006-05-25 10:56:43.000000000 +0200 ++++ mysql-5.0.22.sx/sql/mysql_priv.h 2006-06-06 19:49:38.000000000 +0200 +@@ -1279,6 +1279,12 @@ + #else + extern SHOW_COMP_OPTION have_csv_db; + #endif ++#ifdef HAVE_SPHINX_DB ++extern handlerton sphinx_hton; ++#define have_sphinx_db sphinx_hton.state ++#else ++extern SHOW_COMP_OPTION have_sphinx_db; ++#endif + #ifdef HAVE_FEDERATED_DB + extern handlerton federated_hton; + #define have_federated_db federated_hton.state +diff -B -N -r -u mysql-5.0.22/sql/set_var.cc mysql-5.0.22.sx/sql/set_var.cc +--- mysql-5.0.22/sql/set_var.cc 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/set_var.cc 2006-06-06 19:49:38.000000000 +0200 +@@ -809,6 +809,7 @@ + {"have_compress", (char*) &have_compress, SHOW_HAVE}, + {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, + {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, ++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE}, + {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, + {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, + {"have_geometry", (char*) &have_geometry, SHOW_HAVE}, +diff -B -N -r -u mysql-5.0.22/sql/sql_lex.h mysql-5.0.22.sx/sql/sql_lex.h +--- mysql-5.0.22/sql/sql_lex.h 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/sql_lex.h 2006-06-06 19:49:38.000000000 +0200 +@@ -58,6 +58,7 @@ + SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS, + SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS, + SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS, ++ SQLCOM_SHOW_SPHINX_STATUS, + SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT, + SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS, + SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS, +diff -B -N -r -u mysql-5.0.22/sql/sql_parse.cc mysql-5.0.22.sx/sql/sql_parse.cc +--- mysql-5.0.22/sql/sql_parse.cc 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/sql_parse.cc 2006-06-06 19:49:38.000000000 +0200 +@@ -25,6 +25,9 @@ + #ifdef HAVE_INNOBASE_DB + #include "ha_innodb.h" + #endif ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++#endif + + #ifdef HAVE_NDBCLUSTER_DB + #include "ha_ndbcluster.h" +@@ -2722,6 +2725,15 @@ + break; + } + #endif ++#ifdef HAVE_SPHINX_DB ++ case SQLCOM_SHOW_SPHINX_STATUS: ++ { ++ if (check_global_access(thd, SUPER_ACL)) ++ goto error; ++ res = sphinx_show_status(thd); ++ break; ++ } ++#endif + #ifdef HAVE_REPLICATION + case SQLCOM_LOAD_MASTER_TABLE: + { +diff -B -N -r -u mysql-5.0.22/sql/sql_yacc.yy mysql-5.0.22.sx/sql/sql_yacc.yy +--- mysql-5.0.22/sql/sql_yacc.yy 2006-05-25 10:56:43.000000000 +0200 ++++ mysql-5.0.22.sx/sql/sql_yacc.yy 2006-06-06 19:49:38.000000000 +0200 +@@ -6584,6 +6584,9 @@ + case DB_TYPE_INNODB: + Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; + break; ++ case DB_TYPE_SPHINX_DB: ++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; ++ break; + default: + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); + YYABORT; diff --git a/sphinx.5.0.27.diff b/sphinx.5.0.27.diff new file mode 100644 index 00000000000..9ff6cf4fe48 --- /dev/null +++ b/sphinx.5.0.27.diff @@ -0,0 +1,284 @@ +diff -B -N -r -u mysql-5.0.22/config/ac-macros/ha_sphinx.m4 mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 +--- mysql-5.0.22/config/ac-macros/ha_sphinx.m4 1970-01-01 01:00:00.000000000 +0100 ++++ mysql-5.0.22.sx/config/ac-macros/ha_sphinx.m4 2006-06-06 19:49:38.000000000 +0200 +@@ -0,0 +1,30 @@ ++dnl --------------------------------------------------------------------------- ++dnl Macro: MYSQL_CHECK_EXAMPLEDB ++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used ++dnl --------------------------------------------------------------------------- ++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [ ++ AC_ARG_WITH([sphinx-storage-engine], ++ [ ++ --with-sphinx-storage-engine ++ Enable the Sphinx Storage Engine], ++ [sphinxdb="$withval"], ++ [sphinxdb=no]) ++ AC_MSG_CHECKING([for example storage engine]) ++ ++ case "$sphinxdb" in ++ yes ) ++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine]) ++ AC_MSG_RESULT([yes]) ++ [sphinxdb=yes] ++ ;; ++ * ) ++ AC_MSG_RESULT([no]) ++ [sphinxdb=no] ++ ;; ++ esac ++ ++]) ++dnl --------------------------------------------------------------------------- ++dnl END OF MYSQL_CHECK_EXAMPLE SECTION ++dnl --------------------------------------------------------------------------- ++ +diff -B -N -r -u mysql-5.0.22/configure.in mysql-5.0.22.sx/configure.in +--- mysql-5.0.22/configure.in 2006-05-25 10:56:45.000000000 +0200 ++++ mysql-5.0.22.sx/configure.in 2006-06-06 19:49:38.000000000 +0200 +@@ -41,6 +41,7 @@ + sinclude(config/ac-macros/ha_berkeley.m4) + sinclude(config/ac-macros/ha_blackhole.m4) + sinclude(config/ac-macros/ha_example.m4) ++sinclude(config/ac-macros/ha_sphinx.m4) + sinclude(config/ac-macros/ha_federated.m4) + sinclude(config/ac-macros/ha_innodb.m4) + sinclude(config/ac-macros/ha_ndbcluster.m4) +@@ -2450,6 +2451,7 @@ + MYSQL_CHECK_BDB + MYSQL_CHECK_INNODB + MYSQL_CHECK_EXAMPLEDB ++MYSQL_CHECK_SPHINXDB + MYSQL_CHECK_ARCHIVEDB + MYSQL_CHECK_CSVDB + MYSQL_CHECK_BLACKHOLEDB +diff -B -N -r -u mysql-5.0.22/libmysqld/Makefile.am mysql-5.0.22.sx/libmysqld/Makefile.am +--- mysql-5.0.22/libmysqld/Makefile.am 2006-05-25 10:56:55.000000000 +0200 ++++ mysql-5.0.22.sx/libmysqld/Makefile.am 2006-06-06 19:49:38.000000000 +0200 +@@ -27,7 +27,7 @@ + -DSHAREDIR="\"$(MYSQLSHAREdir)\"" + INCLUDES= @bdb_includes@ \ + -I$(top_builddir)/include -I$(top_srcdir)/include \ +- -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \ ++ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/sql/sphinx \ + -I$(top_srcdir)/regex \ + $(openssl_includes) $(yassl_includes) @ZLIB_INCLUDES@ + +@@ -38,6 +38,7 @@ + libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ + my_time.c + sqlexamplessources = ha_example.cc ha_tina.cc ++sqlsphinxsources = ha_sphinx.cc + + noinst_HEADERS = embedded_priv.h emb_qcache.h + +@@ -65,7 +66,7 @@ + parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ + ha_blackhole.cc ha_archive.cc my_user.c + +-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) ++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources) + libmysqld_a_SOURCES= + + # automake misses these +@@ -133,12 +134,16 @@ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ + done; \ ++ for f in $(sqlsphinxsources); do \ ++ rm -f $$f; \ ++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \ ++ done; \ + rm -f client_settings.h; \ + @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h + + + clean-local: +- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ ++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \ + $(top_srcdir)/linked_libmysqld_sources; \ + rm -f client_settings.h + +diff -B -N -r -u mysql-5.0.22/sql/handler.cc mysql-5.0.22.sx/sql/handler.cc +--- mysql-5.0.22/sql/handler.cc 2006-05-25 10:56:42.000000000 +0200 ++++ mysql-5.0.22.sx/sql/handler.cc 2006-06-06 19:49:38.000000000 +0200 +@@ -78,6 +78,15 @@ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + HTON_NO_FLAGS }; + #endif ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++extern handlerton sphinx_hton; ++#else ++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine", ++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL, ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ++ HTON_NO_FLAGS }; ++#endif + #ifdef HAVE_INNOBASE_DB + #include "ha_innodb.h" + extern handlerton innobase_hton; +@@ -147,6 +156,7 @@ + &example_hton, + &archive_hton, + &tina_hton, ++ &sphinx_hton, + &ndbcluster_hton, + &federated_hton, + &myisammrg_hton, +@@ -345,6 +355,12 @@ + return new (alloc) ha_tina(table); + return NULL; + #endif ++#ifdef HAVE_SPHINX_DB ++ case DB_TYPE_SPHINX_DB: ++ if (have_sphinx_db == SHOW_OPTION_YES) ++ return new (alloc) ha_sphinx(table); ++ return NULL; ++#endif + #ifdef HAVE_NDBCLUSTER_DB + case DB_TYPE_NDBCLUSTER: + if (have_ndbcluster == SHOW_OPTION_YES) +diff -B -N -r -u mysql-5.0.22/sql/handler.h mysql-5.0.22.sx/sql/handler.h +--- mysql-5.0.22/sql/handler.h 2006-05-25 10:56:55.000000000 +0200 ++++ mysql-5.0.22.sx/sql/handler.h 2006-06-06 19:49:38.000000000 +0200 +@@ -183,8 +183,9 @@ + DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, + DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER, + DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB, +- DB_TYPE_FEDERATED_DB, ++ DB_TYPE_FEDERATED_DB, + DB_TYPE_BLACKHOLE_DB, ++ DB_TYPE_SPHINX_DB, + DB_TYPE_DEFAULT // Must be last + }; + +diff -B -N -r -u mysql-5.0.22/sql/Makefile.am mysql-5.0.22.sx/sql/Makefile.am +--- mysql-5.0.22/sql/Makefile.am 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/Makefile.am 2006-06-06 19:49:38.000000000 +0200 +@@ -66,6 +66,7 @@ + sql_array.h sql_cursor.h \ + examples/ha_example.h ha_archive.h \ + examples/ha_tina.h ha_blackhole.h \ ++ sphinx/ha_sphinx.h \ + ha_federated.h + mysqld_SOURCES = sql_lex.cc sql_handler.cc \ + item.cc item_sum.cc item_buff.cc item_func.cc \ +@@ -102,6 +103,7 @@ + sp_cache.cc parse_file.cc sql_trigger.cc \ + examples/ha_example.cc ha_archive.cc \ + examples/ha_tina.cc ha_blackhole.cc \ ++ sphinx/ha_sphinx.cc \ + ha_federated.cc + + gen_lex_hash_SOURCES = gen_lex_hash.cc +diff -B -N -r -u mysql-5.0.22/sql/mysqld.cc mysql-5.0.22.sx/sql/mysqld.cc +--- mysql-5.0.22/sql/mysqld.cc 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/mysqld.cc 2006-06-06 19:49:38.000000000 +0200 +@@ -6420,6 +6420,11 @@ + #else + have_csv_db= SHOW_OPTION_NO; + #endif ++#ifdef HAVE_SPHINX_DB ++ have_sphinx_db= SHOW_OPTION_YES; ++#else ++ have_sphinx_db= SHOW_OPTION_NO; ++#endif + #ifdef HAVE_NDBCLUSTER_DB + have_ndbcluster=SHOW_OPTION_DISABLED; + #else +@@ -7457,6 +7462,7 @@ + #undef have_example_db + #undef have_archive_db + #undef have_csv_db ++#undef have_sphinx_db + #undef have_federated_db + #undef have_partition_db + #undef have_blackhole_db +@@ -7467,6 +7473,7 @@ + SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; ++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO; +diff -B -N -r -u mysql-5.0.22/sql/mysql_priv.h mysql-5.0.22.sx/sql/mysql_priv.h +--- mysql-5.0.22/sql/mysql_priv.h 2006-05-25 10:56:43.000000000 +0200 ++++ mysql-5.0.22.sx/sql/mysql_priv.h 2006-06-06 19:49:38.000000000 +0200 +@@ -1279,6 +1279,12 @@ + #else + extern SHOW_COMP_OPTION have_csv_db; + #endif ++#ifdef HAVE_SPHINX_DB ++extern handlerton sphinx_hton; ++#define have_sphinx_db sphinx_hton.state ++#else ++extern SHOW_COMP_OPTION have_sphinx_db; ++#endif + #ifdef HAVE_FEDERATED_DB + extern handlerton federated_hton; + #define have_federated_db federated_hton.state +diff -B -N -r -u mysql-5.0.22/sql/set_var.cc mysql-5.0.22.sx/sql/set_var.cc +--- mysql-5.0.22/sql/set_var.cc 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/set_var.cc 2006-06-06 19:49:38.000000000 +0200 +@@ -864,6 +864,7 @@ + {"have_compress", (char*) &have_compress, SHOW_HAVE}, + {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, + {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, ++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE}, + {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE}, + {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, + {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, +diff -B -N -r -u mysql-5.0.22/sql/sql_lex.h mysql-5.0.22.sx/sql/sql_lex.h +--- mysql-5.0.22/sql/sql_lex.h 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/sql_lex.h 2006-06-06 19:49:38.000000000 +0200 +@@ -58,6 +58,7 @@ + SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS, + SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS, + SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS, ++ SQLCOM_SHOW_SPHINX_STATUS, + SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT, + SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS, + SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS, +diff -B -N -r -u mysql-5.0.22/sql/sql_parse.cc mysql-5.0.22.sx/sql/sql_parse.cc +--- mysql-5.0.22/sql/sql_parse.cc 2006-05-25 10:56:41.000000000 +0200 ++++ mysql-5.0.22.sx/sql/sql_parse.cc 2006-06-06 19:49:38.000000000 +0200 +@@ -25,6 +25,9 @@ + #ifdef HAVE_INNOBASE_DB + #include "ha_innodb.h" + #endif ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++#endif + + #ifdef HAVE_NDBCLUSTER_DB + #include "ha_ndbcluster.h" +@@ -2722,6 +2725,15 @@ + break; + } + #endif ++#ifdef HAVE_SPHINX_DB ++ case SQLCOM_SHOW_SPHINX_STATUS: ++ { ++ if (check_global_access(thd, SUPER_ACL)) ++ goto error; ++ res = sphinx_show_status(thd); ++ break; ++ } ++#endif + #ifdef HAVE_REPLICATION + case SQLCOM_LOAD_MASTER_TABLE: + { +diff -B -N -r -u mysql-5.0.22/sql/sql_yacc.yy mysql-5.0.22.sx/sql/sql_yacc.yy +--- mysql-5.0.22/sql/sql_yacc.yy 2006-05-25 10:56:43.000000000 +0200 ++++ mysql-5.0.22.sx/sql/sql_yacc.yy 2006-06-06 19:49:38.000000000 +0200 +@@ -6584,6 +6584,9 @@ + case DB_TYPE_INNODB: + Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; + break; ++ case DB_TYPE_SPHINX_DB: ++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; ++ break; + default: + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); + YYABORT; diff --git a/sphinx.5.0.37.diff b/sphinx.5.0.37.diff new file mode 100644 index 00000000000..3f86e545b4d --- /dev/null +++ b/sphinx.5.0.37.diff @@ -0,0 +1,338 @@ +--- mysql-5.0.67/config/ac-macros/ha_sphinx.m4 1970-01-01 10:00:00.000000000 +1000 ++++ mysql-5.0.67-sphinx/config/ac-macros/ha_sphinx.m4 2009-02-14 09:15:48.000000000 +1000 +@@ -0,0 +1,30 @@ ++dnl --------------------------------------------------------------------------- ++dnl Macro: MYSQL_CHECK_EXAMPLEDB ++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used ++dnl --------------------------------------------------------------------------- ++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [ ++ AC_ARG_WITH([sphinx-storage-engine], ++ [ ++ --with-sphinx-storage-engine ++ Enable the Sphinx Storage Engine], ++ [sphinxdb="$withval"], ++ [sphinxdb=no]) ++ AC_MSG_CHECKING([for example storage engine]) ++ ++ case "$sphinxdb" in ++ yes ) ++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine]) ++ AC_MSG_RESULT([yes]) ++ [sphinxdb=yes] ++ ;; ++ * ) ++ AC_MSG_RESULT([no]) ++ [sphinxdb=no] ++ ;; ++ esac ++ ++]) ++dnl --------------------------------------------------------------------------- ++dnl END OF MYSQL_CHECK_EXAMPLE SECTION ++dnl --------------------------------------------------------------------------- ++ +--- mysql-5.0.67/configure.in 2008-08-04 23:19:07.000000000 +1100 ++++ mysql-5.0.67-sphinx/configure.in 2009-02-14 09:15:48.000000000 +1000 +@@ -58,6 +58,7 @@ + sinclude(config/ac-macros/ha_berkeley.m4) + sinclude(config/ac-macros/ha_blackhole.m4) + sinclude(config/ac-macros/ha_example.m4) ++sinclude(config/ac-macros/ha_sphinx.m4) + sinclude(config/ac-macros/ha_federated.m4) + sinclude(config/ac-macros/ha_innodb.m4) + sinclude(config/ac-macros/ha_ndbcluster.m4) +@@ -2625,6 +2626,7 @@ + MYSQL_CHECK_BDB + MYSQL_CHECK_INNODB + MYSQL_CHECK_EXAMPLEDB ++MYSQL_CHECK_SPHINXDB + MYSQL_CHECK_ARCHIVEDB + MYSQL_CHECK_CSVDB + MYSQL_CHECK_BLACKHOLEDB +--- mysql-5.0.67/libmysqld/Makefile.am 2008-08-04 23:19:18.000000000 +1100 ++++ mysql-5.0.67-sphinx/libmysqld/Makefile.am 2009-02-14 09:15:48.000000000 +1000 +@@ -29,6 +29,7 @@ + -I$(top_builddir)/include -I$(top_srcdir)/include \ + -I$(top_builddir)/sql -I$(top_srcdir)/sql \ + -I$(top_srcdir)/sql/examples \ ++ -I$(top_srcdir)/sql/sphinx \ + -I$(top_srcdir)/regex \ + $(openssl_includes) @ZLIB_INCLUDES@ + +@@ -39,6 +40,7 @@ + libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ + my_time.c + sqlexamplessources = ha_example.cc ha_tina.cc ++sqlsphinxsources = ha_sphinx.cc + + noinst_HEADERS = embedded_priv.h emb_qcache.h + +@@ -67,7 +69,7 @@ + parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ + ha_blackhole.cc ha_archive.cc my_user.c + +-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) ++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources) + libmysqld_a_SOURCES= + + # automake misses these +@@ -147,12 +149,16 @@ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ + done; \ ++ for f in $(sqlsphinxsources); do \ ++ rm -f $$f; \ ++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \ ++ done; \ + rm -f client_settings.h; \ + @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h + + + clean-local: +- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ ++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \ + $(top_srcdir)/linked_libmysqld_sources; \ + rm -f client_settings.h + +--- mysql-5.0.67/sql/handler.cc 2008-08-04 23:20:04.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/handler.cc 2009-02-14 09:15:48.000000000 +1000 +@@ -77,6 +77,15 @@ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + HTON_NO_FLAGS }; + #endif ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++extern handlerton sphinx_hton; ++#else ++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine", ++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL, ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ++ HTON_NO_FLAGS }; ++#endif + #ifdef HAVE_INNOBASE_DB + #include "ha_innodb.h" + extern handlerton innobase_hton; +@@ -141,6 +150,7 @@ + &example_hton, + &archive_hton, + &tina_hton, ++ &sphinx_hton, + &ndbcluster_hton, + &federated_hton, + &myisammrg_hton, +@@ -341,6 +351,12 @@ + return new (alloc) ha_tina(table); + return NULL; + #endif ++#ifdef HAVE_SPHINX_DB ++ case DB_TYPE_SPHINX_DB: ++ if (have_sphinx_db == SHOW_OPTION_YES) ++ return new (alloc) ha_sphinx(table); ++ return NULL; ++#endif + #ifdef HAVE_NDBCLUSTER_DB + case DB_TYPE_NDBCLUSTER: + if (have_ndbcluster == SHOW_OPTION_YES) +--- mysql-5.0.67/sql/handler.h 2008-08-04 23:20:04.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/handler.h 2009-02-14 09:15:48.000000000 +1000 +@@ -186,8 +186,9 @@ + DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, + DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER, + DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB, +- DB_TYPE_FEDERATED_DB, ++ DB_TYPE_FEDERATED_DB, + DB_TYPE_BLACKHOLE_DB, ++ DB_TYPE_SPHINX_DB, + DB_TYPE_DEFAULT // Must be last + }; + +--- mysql-5.0.67/sql/Makefile.am 2008-08-04 23:20:02.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/Makefile.am 2009-02-14 09:23:28.000000000 +1000 +@@ -68,6 +68,7 @@ + sql_array.h sql_cursor.h \ + examples/ha_example.h ha_archive.h \ + examples/ha_tina.h ha_blackhole.h \ ++ sphinx/ha_sphinx.h \ + ha_federated.h + mysqld_SOURCES = sql_lex.cc sql_handler.cc \ + item.cc item_sum.cc item_buff.cc item_func.cc \ +@@ -105,6 +106,7 @@ + sp_cache.cc parse_file.cc sql_trigger.cc \ + examples/ha_example.cc ha_archive.cc \ + examples/ha_tina.cc ha_blackhole.cc \ ++ sphinx/ha_sphinx.cc \ + ha_federated.cc + + gen_lex_hash_SOURCES = gen_lex_hash.cc +@@ -174,6 +176,10 @@ + udf_example_la_SOURCES= udf_example.c + udf_example_la_LDFLAGS= -module -rpath $(pkglibdir) + ++pkglib_LTLIBRARIES = sphinx/sphinx.la ++sphinx_sphinx_la_SOURCES = sphinx/snippets_udf.cc ++sphinx_sphinx_la_LDFLAGS = -module ++ + + # Don't update the files from bitkeeper + %::SCCS/s.% +--- mysql-5.0.67/sql/mysqld.cc 2008-08-04 23:20:07.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/mysqld.cc 2009-02-14 09:15:48.000000000 +1000 +@@ -36,6 +36,10 @@ + #include + #endif + ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++#endif ++ + #ifdef HAVE_INNOBASE_DB + #define OPT_INNODB_DEFAULT 1 + #else +@@ -6633,6 +6637,13 @@ + {"Threads_running", (char*) &thread_running, SHOW_INT_CONST}, + {"Uptime", (char*) 0, SHOW_STARTTIME}, + {"Uptime_since_flush_status",(char*) 0, SHOW_FLUSHTIME}, ++#ifdef HAVE_SPHINX_DB ++ {"sphinx_total", (char *)sphinx_showfunc_total, SHOW_SPHINX_FUNC}, ++ {"sphinx_total_found", (char *)sphinx_showfunc_total_found, SHOW_SPHINX_FUNC}, ++ {"sphinx_time", (char *)sphinx_showfunc_time, SHOW_SPHINX_FUNC}, ++ {"sphinx_word_count", (char *)sphinx_showfunc_word_count, SHOW_SPHINX_FUNC}, ++ {"sphinx_words", (char *)sphinx_showfunc_words, SHOW_SPHINX_FUNC}, ++#endif + {NullS, NullS, SHOW_LONG} + }; + +@@ -6875,6 +6886,11 @@ + #else + have_csv_db= SHOW_OPTION_NO; + #endif ++#ifdef HAVE_SPHINX_DB ++ have_sphinx_db= SHOW_OPTION_YES; ++#else ++ have_sphinx_db= SHOW_OPTION_NO; ++#endif + #ifdef HAVE_NDBCLUSTER_DB + have_ndbcluster=SHOW_OPTION_DISABLED; + #else +@@ -7983,6 +7999,7 @@ + #undef have_example_db + #undef have_archive_db + #undef have_csv_db ++#undef have_sphinx_db + #undef have_federated_db + #undef have_partition_db + #undef have_blackhole_db +@@ -7993,6 +8010,7 @@ + SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; ++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO; +--- mysql-5.0.67/sql/mysql_priv.h 2008-08-04 23:20:07.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/mysql_priv.h 2009-02-14 09:15:48.000000000 +1000 +@@ -1439,6 +1439,12 @@ + #else + extern SHOW_COMP_OPTION have_csv_db; + #endif ++#ifdef HAVE_SPHINX_DB ++extern handlerton sphinx_hton; ++#define have_sphinx_db sphinx_hton.state ++#else ++extern SHOW_COMP_OPTION have_sphinx_db; ++#endif + #ifdef HAVE_FEDERATED_DB + extern handlerton federated_hton; + #define have_federated_db federated_hton.state +--- mysql-5.0.67/sql/set_var.cc 2008-08-04 23:20:08.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/set_var.cc 2009-02-14 09:15:48.000000000 +1000 +@@ -888,6 +888,7 @@ + {"have_compress", (char*) &have_compress, SHOW_HAVE}, + {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, + {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, ++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE}, + {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE}, + {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, + {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, +--- mysql-5.0.67/sql/sql_lex.h 2008-08-04 23:20:10.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/sql_lex.h 2009-02-14 09:15:48.000000000 +1000 +@@ -57,6 +57,7 @@ + SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS, + SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS, + SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS, ++ SQLCOM_SHOW_SPHINX_STATUS, + SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT, + SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS, + SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS, +--- mysql-5.0.67/sql/sql_parse.cc 2008-08-04 23:20:10.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/sql_parse.cc 2009-02-14 09:15:48.000000000 +1000 +@@ -24,6 +24,9 @@ + #ifdef HAVE_INNOBASE_DB + #include "ha_innodb.h" + #endif ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++#endif + + #ifdef HAVE_NDBCLUSTER_DB + #include "ha_ndbcluster.h" +@@ -3006,6 +3009,15 @@ + break; + } + #endif ++#ifdef HAVE_SPHINX_DB ++ case SQLCOM_SHOW_SPHINX_STATUS: ++ { ++ if (check_global_access(thd, SUPER_ACL)) ++ goto error; ++ res = sphinx_show_status(thd); ++ break; ++ } ++#endif + #ifdef HAVE_REPLICATION + case SQLCOM_LOAD_MASTER_TABLE: + { +--- mysql-5.0.67/sql/sql_yacc.yy 2008-08-04 23:20:12.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/sql_yacc.yy 2009-02-14 09:15:48.000000000 +1000 +@@ -7393,6 +7393,9 @@ + case DB_TYPE_INNODB: + Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; + break; ++ case DB_TYPE_SPHINX_DB: ++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; ++ break; + default: + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); + MYSQL_YYABORT; +--- mysql-5.0.67/sql/structs.h 2008-08-04 23:20:12.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/structs.h 2009-02-14 09:15:48.000000000 +1000 +@@ -188,6 +188,9 @@ + SHOW_SSL_CTX_SESS_TIMEOUTS, SHOW_SSL_CTX_SESS_CACHE_FULL, + SHOW_SSL_GET_CIPHER_LIST, + #endif /* HAVE_OPENSSL */ ++#ifdef HAVE_SPHINX_DB ++ SHOW_SPHINX_FUNC, ++#endif + SHOW_NET_COMPRESSION, + SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS, + SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG, +--- mysql-5.0.67/sql/sql_show.cc 2008-08-04 23:20:11.000000000 +1100 ++++ mysql-5.0.67-sphinx/sql/sql_show.cc 2009-02-14 09:15:48.000000000 +1000 +@@ -1473,6 +1473,16 @@ + value= (char*) ((sys_var*) value)->value_ptr(thd, value_type, + &null_lex_str); + } ++ #ifdef HAVE_SPHINX_DB ++ else if (show_type == SHOW_SPHINX_FUNC) ++ { ++ SHOW_VAR var; ++ ((int (*)(THD *, SHOW_VAR *, char *))value)(thd, &var, buff); ++ ++ value = var.value; ++ show_type = var.type; ++ } ++ #endif /* HAVE_SPHINX_DB */ + + pos= end= buff; + switch (show_type) { From 01673997d7165870b5df6e36bcf3492c708bc037 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 1 Feb 2014 10:56:56 +0100 Subject: [PATCH 157/163] sphinxse 2.1.5-release --- CMakeLists.txt | 9 +- INSTALL | 48 ++ ha_sphinx.cc | 1052 ++++++++++++++++++++--------- ha_sphinx.h | 30 +- make-patch.sh | 0 snippets_udf.cc | 1582 +++++++++++++++++++++++--------------------- sphinx.5.0.91.diff | 400 +++++++++++ 7 files changed, 2045 insertions(+), 1076 deletions(-) create mode 100644 INSTALL mode change 100644 => 100755 make-patch.sh create mode 100644 sphinx.5.0.91.diff diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bc04eefc44..87160985243 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,5 +7,10 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/regex) -SET(SPHINX_SOURCES ha_sphinx.cc) -ADD_LIBRARY(sphinx ha_sphinx.cc) +SET(SPHINX_SOURCES ha_sphinx.cc snippets_udf.cc) +IF(MYSQL_VERSION_ID LESS 50515) +ADD_LIBRARY(sphinx ha_sphinx.cc snippets_udf.cc) +ELSE() +SET(SPHINX_PLUGIN_DYNAMIC "ha_sphinx") +MYSQL_ADD_PLUGIN(sphinx ${SPHINX_SOURCES} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES mysys) +ENDIF() diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000000..5c2361443b8 --- /dev/null +++ b/INSTALL @@ -0,0 +1,48 @@ +Building MySQL with SphinxSE +============================= + +Note: BUILD/autorun.sh step on Linux might malfunction with some +versions of automake; autorun.sh will not fail but the build will. +automake 1.9.6 is known to work. + + + +MySQL 5.0.x on Linux +--------------------- + +tar zxvf mysql-5.0.91.tar.gz +cp -R mysqlse mysql-5.0.91/sql/sphinx +cd mysql-5.0.91 + +patch -p1 -i sql/sphinx/sphinx.5.0.91.diff +sh BUILD/autorun.sh +./configure --with-sphinx-storage-engine +make + + + +MySQL 5.1.x on Linux +--------------------- + +tar zxvf mysql-5.1.47.tar.gz +cp -R -p mysqlse mysql-5.1.47/storage/sphinx +cd mysql-5.1.47 + +sh BUILD/autorun.sh +./configure --with-plugins=sphinx +make + + + +MySQL 5.0.x on Windows +----------------------- + +tar zxvf mysql-5.0.91.tar.gz +cp -R mysqlse mysql-5.0.91/sql/sphinx +cd mysql-5.0.91 + +patch -p1 -i sql/sphinx/sphinx.5.0.91.diff +win\configure.js WITH_SPHINX_STORAGE_ENGINE +win\build-vs8 + +--eof-- diff --git a/ha_sphinx.cc b/ha_sphinx.cc index 94e7e3a4cae..48a8ad5f9b3 100644 --- a/ha_sphinx.cc +++ b/ha_sphinx.cc @@ -1,5 +1,16 @@ // -// $Id$ +// $Id: ha_sphinx.cc 4507 2014-01-22 15:24:34Z deogar $ +// + +// +// 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 +// it under the terms of the GNU General Public License. You should have +// received a copy of the GPL license along with this program; if you +// did not, you can find it at http://www.gnu.org/ // #ifdef USE_PRAGMA_IMPLEMENTATION @@ -13,7 +24,10 @@ #include -#if MYSQL_VERSION_ID>50100 +#if MYSQL_VERSION_ID>=50515 +#include "sql_class.h" +#include "sql_array.h" +#elif MYSQL_VERSION_ID>50100 #include "mysql_priv.h" #include #else @@ -22,6 +36,7 @@ #include #include +#include // include client for INSERT table (sort of redoing federated..) #ifndef __WIN__ // UNIX-specific @@ -107,28 +122,48 @@ void sphUnalignedWrite ( void * pPtr, const T & tVal ) #endif +#if MYSQL_VERSION_ID>=50515 + +#define sphinx_hash_init my_hash_init +#define sphinx_hash_free my_hash_free +#define sphinx_hash_search my_hash_search +#define sphinx_hash_delete my_hash_delete + +#else + +#define sphinx_hash_init hash_init +#define sphinx_hash_free hash_free +#define sphinx_hash_search hash_search +#define sphinx_hash_delete hash_delete + +#endif + ///////////////////////////////////////////////////////////////////////////// // FIXME! make this all dynamic #define SPHINXSE_MAX_FILTERS 32 -#define SPHINXSE_DEFAULT_HOST "127.0.0.1" -#define SPHINXSE_DEFAULT_PORT 9312 -#define SPHINXSE_DEFAULT_INDEX "*" +#define SPHINXAPI_DEFAULT_HOST "127.0.0.1" +#define SPHINXAPI_DEFAULT_PORT 9312 +#define SPHINXAPI_DEFAULT_INDEX "*" + +#define SPHINXQL_DEFAULT_PORT 9306 #define SPHINXSE_SYSTEM_COLUMNS 3 #define SPHINXSE_MAX_ALLOC (16*1024*1024) #define SPHINXSE_MAX_KEYWORDSTATS 4096 -// FIXME! all the following is cut-n-paste from sphinx.h and searchd.cpp -#define SPHINX_VERSION "0.9.9" +#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.. enum { SPHINX_SEARCHD_PROTO = 1, SEARCHD_COMMAND_SEARCH = 0, - VER_COMMAND_SEARCH = 0x116, + VER_COMMAND_SEARCH = 0x119, }; /// search query sorting orders @@ -168,6 +203,8 @@ enum ESphRankMode SPH_RANK_PROXIMITY = 4, ///< phrase proximity SPH_RANK_MATCHANY = 5, ///< emulate old match-any weighting SPH_RANK_FIELDMASK = 6, ///< sets bits where there were matches + SPH_RANK_SPH04 = 7, ///< codename SPH04, phrase proximity + bm25 + head/exact boost + SPH_RANK_EXPR = 8, ///< expression based ranker SPH_RANK_TOTAL, SPH_RANK_DEFAULT = SPH_RANK_PROXIMITY_BM25 @@ -193,8 +230,10 @@ enum SPH_ATTR_BOOL = 4, ///< this attr is a boolean bit field SPH_ATTR_FLOAT = 5, SPH_ATTR_BIGINT = 6, + SPH_ATTR_STRING = 7, ///< string (binary; in-memory) - SPH_ATTR_MULTI = 0x40000000UL ///< this attr has multiple values (0 or more) + SPH_ATTR_UINT32SET = 0x40000001UL, ///< this attr is multiple int32 values (0 or more) + SPH_ATTR_UINT64SET = 0x40000002UL ///< this attr is multiple int64 values (0 or more) }; /// known answers @@ -249,21 +288,26 @@ inline void SPH_DEBUG ( const char *, ... ) {} ////////////////////////////////////////////////////////////////////////////// -/// a structure that will be shared among all open Sphinx SE handlers +/// per-table structure that will be shared among all open Sphinx SE handlers struct CSphSEShare { pthread_mutex_t m_tMutex; THR_LOCK m_tLock; char * m_sTable; - char * m_sScheme; - char * m_sHost; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY - char * m_sSocket; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY - char * m_sIndex; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY + char * m_sScheme; ///< our connection string + char * m_sHost; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY + char * m_sSocket; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY + char * m_sIndex; ///< points into m_sScheme buffer, DO NOT FREE EXPLICITLY ushort m_iPort; + 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; @@ -276,6 +320,7 @@ struct CSphSEShare , m_sSocket ( NULL ) , m_sIndex ( NULL ) , m_iPort ( 0 ) + , m_bSphinxQL ( false ) , m_iTableNameLen ( 0 ) , m_iUseCount ( 1 ) , m_pTableQueryCharset ( NULL ) @@ -391,12 +436,26 @@ 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 + + bool m_bCondId; ///< got a value from condition pushdown + longlong m_iCondId; ///< value acquired from id=value condition pushdown + bool m_bCondDone; ///< index_read() is now over CSphSEThreadData () : m_bStats ( false ) , m_bQuery ( false ) , m_pQueryCharset ( NULL ) + , m_bReplace ( false ) + , m_bCondId ( false ) + , m_iCondId ( 0 ) + , m_bCondDone ( false ) {} }; @@ -471,6 +530,7 @@ private: int m_iWeights; ESphMatchMode m_eMode; ESphRankMode m_eRanker; + char * m_sRankExpr; ESphSortOrder m_eSort; char * m_sSortBy; int m_iMaxMatches; @@ -502,6 +562,7 @@ private: float m_fGeoLongitude; char * m_sComment; + char * m_sSelect; struct Override_t { @@ -538,10 +599,10 @@ protected: bool ParseField ( char * sField ); void SendBytes ( const void * pBytes, int iBytes ); - void SendWord ( short int v ) { v = ntohs(v); SendBytes ( &v, sizeof(short int) ); } - void SendInt ( int v ) { v = ntohl(v); SendBytes ( &v, sizeof(int) ); } - void SendDword ( uint v ) { v = ntohl(v) ;SendBytes ( &v, sizeof(uint) ); } - void SendUint64 ( ulonglong v ) { SendDword ( uint(v>>32) ); SendDword ( uint(v&0xFFFFFFFFUL) ); } + void SendWord ( short int v ) { v = ntohs(v); SendBytes ( &v, sizeof(v) ); } + void SendInt ( int v ) { v = ntohl(v); SendBytes ( &v, sizeof(v) ); } + void SendDword ( uint v ) { v = ntohl(v) ;SendBytes ( &v, sizeof(v) ); } + void SendUint64 ( ulonglong v ) { SendDword ( (uint)(v>>32) ); SendDword ( (uint)(v&0xFFFFFFFFUL) ); } void SendString ( const char * v ) { int iLen = strlen(v); SendDword(iLen); SendBytes ( v, iLen ); } void SendFloat ( float v ) { SendDword ( sphF2DW(v) ); } }; @@ -574,7 +635,7 @@ bool sphinx_show_status ( THD * thd ); ////////////////////////////////////////////////////////////////////////////// static const char sphinx_hton_name[] = "SPHINX"; -static const char sphinx_hton_comment[] = "Sphinx storage engine " SPHINX_VERSION; +static const char sphinx_hton_comment[] = "Sphinx storage engine " SPHINXSE_VERSION; #if MYSQL_VERSION_ID<50100 handlerton sphinx_hton = @@ -643,19 +704,19 @@ static int sphinx_init_func ( void * p ) if ( !sphinx_init ) { sphinx_init = 1; - VOID ( pthread_mutex_init ( &sphinx_mutex, MY_MUTEX_INIT_FAST ) ); - hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, + void ( pthread_mutex_init ( &sphinx_mutex, MY_MUTEX_INIT_FAST ) ); + sphinx_hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, sphinx_get_key, 0, 0 ); #if MYSQL_VERSION_ID > 50100 handlerton * hton = (handlerton*) p; - hton->state = SHOW_OPTION_YES; - hton->db_type = DB_TYPE_DEFAULT; - hton->create = sphinx_create_handler; - hton->close_connection = sphinx_close_connection; - hton->show_status = sphinx_show_status; - hton->panic = sphinx_panic; - hton->flags = HTON_CAN_RECREATE; + hton->state = SHOW_OPTION_YES; + hton->db_type = DB_TYPE_FIRST_DYNAMIC; + hton->create = sphinx_create_handler; + hton->close_connection = sphinx_close_connection; + hton->show_status = sphinx_show_status; + hton->panic = sphinx_panic; + hton->flags = HTON_CAN_RECREATE; #endif } SPH_RET(0); @@ -694,7 +755,7 @@ static int sphinx_done_func ( void * ) sphinx_init = 0; if ( sphinx_open_tables.records ) error = 1; - hash_free ( &sphinx_open_tables ); + sphinx_hash_free ( &sphinx_open_tables ); pthread_mutex_destroy ( &sphinx_mutex ); } @@ -742,15 +803,22 @@ bool sphinx_show_status ( THD * thd ) char buf1[IO_SIZE]; uint buf1len; char buf2[IO_SIZE]; - uint buf2len= 0; + uint buf2len = 0; String words; buf1[0] = '\0'; buf2[0] = '\0'; + #if MYSQL_VERSION_ID>50100 + // 5.1.x style stats CSphSEThreadData * pTls = (CSphSEThreadData*) ( *thd_ha_data ( thd, hton ) ); + +#define LOC_STATS(_key,_keylen,_val,_vallen) \ + stat_print ( thd, sphinx_hton_name, strlen(sphinx_hton_name), _key, _keylen, _val, _vallen ); + #else + // 5.0.x style stats if ( have_sphinx_db!=SHOW_OPTION_YES ) { my_message ( ER_NOT_SUPPORTED_YET, @@ -759,32 +827,33 @@ bool sphinx_show_status ( THD * thd ) SPH_RET(TRUE); } CSphSEThreadData * pTls = (CSphSEThreadData*) thd->ha_data[sphinx_hton.slot]; + + field_list.push_back ( new Item_empty_string ( "Type", 10 ) ); + field_list.push_back ( new Item_empty_string ( "Name", FN_REFLEN ) ); + field_list.push_back ( new Item_empty_string ( "Status", 10 ) ); + if ( protocol->send_fields ( &field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF ) ) + SPH_RET(TRUE); + +#define LOC_STATS(_key,_keylen,_val,_vallen) \ + protocol->prepare_for_resend (); \ + protocol->store ( "SPHINX", 6, system_charset_info ); \ + protocol->store ( _key, _keylen, system_charset_info ); \ + protocol->store ( _val, _vallen, system_charset_info ); \ + if ( protocol->write() ) \ + SPH_RET(TRUE); + #endif + + // show query stats if ( pTls && pTls->m_bStats ) { const CSphSEStats * pStats = &pTls->m_tStats; buf1len = my_snprintf ( buf1, sizeof(buf1), - "total: %d, total found: %d, time: %d, words: %d", + "total: %d, total found: %d, time: %d, words: %d", pStats->m_iMatchesTotal, pStats->m_iMatchesFound, pStats->m_iQueryMsec, pStats->m_iWords ); -#if MYSQL_VERSION_ID>50100 - stat_print ( thd, sphinx_hton_name, strlen(sphinx_hton_name), - STRING_WITH_LEN("stats"), buf1, buf1len ); -#else - field_list.push_back ( new Item_empty_string ( "Type",10 ) ); - field_list.push_back ( new Item_empty_string ( "Name",FN_REFLEN ) ); - field_list.push_back ( new Item_empty_string ( "Status",10 ) ); - if ( protocol->send_fields ( &field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF ) ) - SPH_RET(TRUE); - - protocol->prepare_for_resend (); - protocol->store ( STRING_WITH_LEN("SPHINX"), system_charset_info ); - protocol->store ( STRING_WITH_LEN("stats"), system_charset_info ); - protocol->store ( buf1, buf1len, system_charset_info ); - if ( protocol->write() ) - SPH_RET(TRUE); -#endif + LOC_STATS ( "stats", 5, buf1, buf1len ); if ( pStats->m_iWords ) { @@ -808,58 +877,30 @@ bool sphinx_show_status ( THD * thd ) iWord = sBuf3.length(); } -#if MYSQL_VERSION_ID>50100 - stat_print ( thd, sphinx_hton_name, strlen(sphinx_hton_name), - STRING_WITH_LEN("words"), sWord, iWord ); -#else - protocol->prepare_for_resend (); - protocol->store ( STRING_WITH_LEN("SPHINX"), system_charset_info ); - protocol->store ( STRING_WITH_LEN("words"), system_charset_info ); - protocol->store ( sWord, iWord, system_charset_info ); - if ( protocol->write() ) - SPH_RET(TRUE); -#endif + LOC_STATS ( "words", 5, sWord, iWord ); } + } - // send last error or warning - if ( pStats->m_sLastMessage && pStats->m_sLastMessage[0] ) - { - const char * sMessageType = pStats->m_bLastError ? "error" : "warning"; + // show last error or warning (either in addition to stats, or on their own) + if ( pTls && pTls->m_tStats.m_sLastMessage && pTls->m_tStats.m_sLastMessage[0] ) + { + const char * sMessageType = pTls->m_tStats.m_bLastError ? "error" : "warning"; -#if MYSQL_VERSION_ID>50100 - stat_print ( thd, sphinx_hton_name, strlen(sphinx_hton_name), - sMessageType, strlen(sMessageType), pStats->m_sLastMessage, strlen(pStats->m_sLastMessage) ); -#else - protocol->prepare_for_resend (); - protocol->store ( STRING_WITH_LEN("SPHINX"), system_charset_info ); - protocol->store ( sMessageType, strlen(sMessageType), system_charset_info ); - protocol->store ( pStats->m_sLastMessage, strlen(pStats->m_sLastMessage), system_charset_info ); - if ( protocol->write() ) - SPH_RET(TRUE); -#endif - } + LOC_STATS ( + sMessageType, strlen ( sMessageType ), + pTls->m_tStats.m_sLastMessage, strlen ( pTls->m_tStats.m_sLastMessage ) ); } else { - #if MYSQL_VERSION_ID < 50100 - field_list.push_back ( new Item_empty_string ( "Type", 10 ) ); - field_list.push_back ( new Item_empty_string ( "Name", FN_REFLEN ) ); - field_list.push_back ( new Item_empty_string ( "Status", 10 ) ); - if ( protocol->send_fields ( &field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF ) ) - SPH_RET(TRUE); - - protocol->prepare_for_resend (); - protocol->store ( STRING_WITH_LEN("SPHINX"), system_charset_info ); - protocol->store ( STRING_WITH_LEN("stats"), system_charset_info ); - protocol->store ( STRING_WITH_LEN("no query has been executed yet"), system_charset_info ); - if ( protocol->write() ) - SPH_RET(TRUE); - #endif + // well, nothing to show just yet +#if MYSQL_VERSION_ID < 50100 + LOC_STATS ( "stats", 5, "no query has been executed yet", sizeof("no query has been executed yet")-1 ); +#endif } - #if MYSQL_VERSION_ID < 50100 +#if MYSQL_VERSION_ID < 50100 send_eof(thd); - #endif +#endif SPH_RET(FALSE); } @@ -926,10 +967,9 @@ static void sphLogError ( const char * sFmt, ... ) // the following scheme variants are recognized // -// sphinx://host/index -// sphinx://host:port/index -// unix://unix/domain/socket:index -// unix://unix/domain/socket +// sphinx://host[:port]/index +// sphinxql://host[:port]/index +// unix://unix/domain/socket[:index] static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) { SPH_ENTER_FUNC(); @@ -939,12 +979,12 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) // check incoming stuff if ( !table ) { - sphLogError ( "table==NULL in ParseUrl()" ); + sphLogError ( "table==NULL in ParseUrl()" ); return false; } if ( !table->s ) { - sphLogError ( "(table->s)==NULL in ParseUrl()" ); + sphLogError ( "(table->s)==NULL in ParseUrl()" ); return false; } @@ -966,69 +1006,121 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) } } - char * sScheme = NULL; - char * sHost = SPHINXSE_DEFAULT_HOST; - char * sIndex = SPHINXSE_DEFAULT_INDEX; - int iPort = SPHINXSE_DEFAULT_PORT; - + // defaults bool bOk = true; + bool bQL = false; + char * sScheme = NULL; + char * sHost = SPHINXAPI_DEFAULT_HOST; + char * sIndex = SPHINXAPI_DEFAULT_INDEX; + int iPort = SPHINXAPI_DEFAULT_PORT; + + // parse connection string, if any while ( table->s->connect_string.length!=0 ) { - bOk = false; sScheme = sphDup ( table->s->connect_string.str, table->s->connect_string.length ); sHost = strstr ( sScheme, "://" ); if ( !sHost ) + { + bOk = false; break; + } sHost[0] = '\0'; - sHost += 2; + sHost += 3; + + ///////////////////////////// + // sphinxapi via unix socket + ///////////////////////////// if ( !strcmp ( sScheme, "unix" ) ) { - // unix-domain socket + sHost--; // reuse last slash iPort = 0; if (!( sIndex = strrchr ( sHost, ':' ) )) - sIndex = SPHINXSE_DEFAULT_INDEX; + sIndex = SPHINXAPI_DEFAULT_INDEX; else { *sIndex++ = '\0'; if ( !*sIndex ) - sIndex = SPHINXSE_DEFAULT_INDEX; + sIndex = SPHINXAPI_DEFAULT_INDEX; } bOk = true; break; } - if( strcmp ( sScheme, "sphinx" )!=0 && strcmp ( sScheme, "inet" )!=0 ) - break; - // tcp - sHost++; - char * sPort = strchr ( sHost, ':' ); - if ( sPort ) + ///////////////////// + // sphinxapi via tcp + ///////////////////// + + if ( !strcmp ( sScheme, "sphinx" ) ) { - *sPort++ = '\0'; - if ( *sPort ) + char * sPort = strchr ( sHost, ':' ); + if ( sPort ) { - sIndex = strchr ( sPort, '/' ); + *sPort++ = '\0'; + if ( *sPort ) + { + sIndex = strchr ( sPort, '/' ); + if ( sIndex ) + *sIndex++ = '\0'; + else + sIndex = SPHINXAPI_DEFAULT_INDEX; + + iPort = atoi(sPort); + if ( !iPort ) + iPort = SPHINXAPI_DEFAULT_PORT; + } + } else + { + sIndex = strchr ( sHost, '/' ); if ( sIndex ) - *sIndex++ = '\0'; + *sIndex++ = '\0'; else - sIndex = SPHINXSE_DEFAULT_INDEX; + sIndex = SPHINXAPI_DEFAULT_INDEX; + } + bOk = true; + break; + } + + //////////// + // sphinxql + //////////// + + if ( !strcmp ( sScheme, "sphinxql" ) ) + { + bQL = true; + iPort = SPHINXQL_DEFAULT_PORT; + + // handle port + char * sPort = strchr ( sHost, ':' ); + sIndex = sHost; // starting point for index name search + + if ( sPort ) + { + *sPort++ = '\0'; + sIndex = sPort; iPort = atoi(sPort); if ( !iPort ) - iPort = SPHINXSE_DEFAULT_PORT; + { + bOk = false; // invalid port; can report ER_FOREIGN_DATA_STRING_INVALID + break; + } } - } else - { - sIndex = strchr ( sHost, '/' ); + + // find index + sIndex = strchr ( sIndex, '/' ); if ( sIndex ) *sIndex++ = '\0'; - else - sIndex = SPHINXSE_DEFAULT_INDEX; + + // final checks + // host and index names are required + bOk = ( sHost && *sHost && sIndex && *sIndex ); + break; } - bOk = true; + // unknown case + bOk = false; break; } @@ -1045,6 +1137,7 @@ static bool ParseUrl ( CSphSEShare * share, TABLE * table, bool bCreate ) share->m_sHost = sHost; share->m_sIndex = sIndex; share->m_iPort = (ushort)iPort; + share->m_bSphinxQL = bQL; } } if ( !bOk && !share ) @@ -1067,12 +1160,12 @@ static CSphSEShare * get_share ( const char * table_name, TABLE * table ) { // check if we already have this share #if MYSQL_VERSION_ID>=50120 - pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); + pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); #else #ifdef __WIN__ - pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, (const byte *) table_name, strlen(table_name) ); + pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, (const byte *) table_name, strlen(table_name) ); #else - pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, table_name, strlen(table_name) ); + pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, table_name, strlen(table_name) ); #endif // win #endif // pre-5.1.20 @@ -1088,13 +1181,15 @@ static CSphSEShare * get_share ( const char * table_name, TABLE * table ) break; // try to setup it - pShare->m_pTableQueryCharset = table->field[2]->charset(); if ( !ParseUrl ( pShare, table, false ) ) { SafeDelete ( pShare ); break; } + if ( !pShare->m_bSphinxQL ) + pShare->m_pTableQueryCharset = table->field[2]->charset(); + // try to hash it pShare->m_iTableNameLen = strlen(table_name); pShare->m_sTable = sphDup ( table_name ); @@ -1122,7 +1217,7 @@ static int free_share ( CSphSEShare * pShare ) if ( !--pShare->m_iUseCount ) { - hash_delete ( &sphinx_open_tables, (byte *)pShare ); + sphinx_hash_delete ( &sphinx_open_tables, (byte *)pShare ); SafeDelete ( pShare ); } @@ -1155,6 +1250,7 @@ CSphSEQuery::CSphSEQuery ( const char * sQuery, int iLength, const char * sIndex , m_iWeights ( 0 ) , m_eMode ( SPH_MATCH_ALL ) , m_eRanker ( SPH_RANK_PROXIMITY_BM25 ) + , m_sRankExpr ( NULL ) , m_eSort ( SPH_SORT_RELEVANCE ) , m_sSortBy ( "" ) , m_iMaxMatches ( 1000 ) @@ -1177,6 +1273,7 @@ CSphSEQuery::CSphSEQuery ( const char * sQuery, int iLength, const char * sIndex , m_fGeoLatitude ( 0.0f ) , m_fGeoLongitude ( 0.0f ) , m_sComment ( "" ) + , m_sSelect ( "" ) , m_pBuf ( NULL ) , m_pCur ( NULL ) @@ -1185,8 +1282,8 @@ CSphSEQuery::CSphSEQuery ( const char * sQuery, int iLength, const char * sIndex { m_sQueryBuffer = new char [ iLength+2 ]; memcpy ( m_sQueryBuffer, sQuery, iLength ); - m_sQueryBuffer[iLength]= ';'; - m_sQueryBuffer[iLength+1]= '\0'; + m_sQueryBuffer[iLength] = ';'; + m_sQueryBuffer[iLength+1] = '\0'; } @@ -1242,22 +1339,20 @@ int CSphSEQuery::ParseArray ( T ** ppValues, const char * sValue ) if ( !bPrevDigit ) uValue = 0; uValue = uValue*10 + ( (*pValue)-'0' ); - } - else if ( bPrevDigit ) + } else if ( bPrevDigit ) { assert ( iIndexs && isspace(p[-1]) ) + while ( p>s && isspace ( p[-1] ) ) p--; *p = '\0'; @@ -1284,6 +1379,11 @@ static bool myisattr ( char c ) c=='_'; } +static bool myismagic ( char c ) +{ + return c=='@'; +} + bool CSphSEQuery::ParseField ( char * sField ) { @@ -1305,11 +1405,13 @@ bool CSphSEQuery::ParseField ( char * sField ) m_sQuery = sField; m_bQuery = true; - // unescape + // unescape only 1st one char *s = sField, *d = sField; + int iSlashes = 0; while ( *s ) { - if ( *s!='\\' ) *d++ = *s; + iSlashes = ( *s=='\\' ) ? iSlashes+1 : 0; + if ( ( iSlashes%2 )==0 ) *d++ = *s; s++; } *d = '\0'; @@ -1341,20 +1443,20 @@ bool CSphSEQuery::ParseField ( char * sField ) else if ( !strcmp ( sName, "distinct" ) ) m_sGroupDistinct = sValue; else if ( !strcmp ( sName, "cutoff" ) ) m_iCutoff = iValue; else if ( !strcmp ( sName, "comment" ) ) m_sComment = sValue; + else if ( !strcmp ( sName, "select" ) ) m_sSelect = sValue; else if ( !strcmp ( sName, "mode" ) ) { - m_eMode = SPH_MATCH_ALL; - if ( !strcmp ( sValue, "any") ) m_eMode = SPH_MATCH_ANY; + if ( !strcmp ( sValue, "any" ) ) m_eMode = SPH_MATCH_ANY; else if ( !strcmp ( sValue, "phrase" ) ) m_eMode = SPH_MATCH_PHRASE; - else if ( !strcmp ( sValue, "boolean") ) m_eMode = SPH_MATCH_BOOLEAN; - else if ( !strcmp ( sValue, "ext") ) m_eMode = SPH_MATCH_EXTENDED; - else if ( !strcmp ( sValue, "extended") ) m_eMode = SPH_MATCH_EXTENDED; - else if ( !strcmp ( sValue, "ext2") ) m_eMode = SPH_MATCH_EXTENDED2; - else if ( !strcmp ( sValue, "extended2") ) m_eMode = SPH_MATCH_EXTENDED2; - else if ( !strcmp ( sValue, "all") ) m_eMode = SPH_MATCH_ALL; - else if ( !strcmp ( sValue, "fullscan") ) m_eMode = SPH_MATCH_FULLSCAN; + else if ( !strcmp ( sValue, "boolean" ) ) m_eMode = SPH_MATCH_BOOLEAN; + else if ( !strcmp ( sValue, "ext" ) ) m_eMode = SPH_MATCH_EXTENDED; + else if ( !strcmp ( sValue, "extended" ) ) m_eMode = SPH_MATCH_EXTENDED; + else if ( !strcmp ( sValue, "ext2" ) ) m_eMode = SPH_MATCH_EXTENDED2; + else if ( !strcmp ( sValue, "extended2" ) ) m_eMode = SPH_MATCH_EXTENDED2; + else if ( !strcmp ( sValue, "all" ) ) m_eMode = SPH_MATCH_ALL; + else if ( !strcmp ( sValue, "fullscan" ) ) m_eMode = SPH_MATCH_FULLSCAN; else { snprintf ( m_sParseError, sizeof(m_sParseError), "unknown matching mode '%s'", sValue ); @@ -1362,27 +1464,31 @@ bool CSphSEQuery::ParseField ( char * sField ) } } else if ( !strcmp ( sName, "ranker" ) ) { - m_eRanker = SPH_RANK_PROXIMITY_BM25; - if ( !strcmp ( sValue, "proximity_bm25") ) m_eRanker = SPH_RANK_PROXIMITY_BM25; + if ( !strcmp ( sValue, "proximity_bm25" ) ) m_eRanker = SPH_RANK_PROXIMITY_BM25; else if ( !strcmp ( sValue, "bm25" ) ) m_eRanker = SPH_RANK_BM25; else if ( !strcmp ( sValue, "none" ) ) m_eRanker = SPH_RANK_NONE; else if ( !strcmp ( sValue, "wordcount" ) ) m_eRanker = SPH_RANK_WORDCOUNT; else if ( !strcmp ( sValue, "proximity" ) ) m_eRanker = SPH_RANK_PROXIMITY; else if ( !strcmp ( sValue, "matchany" ) ) m_eRanker = SPH_RANK_MATCHANY; else if ( !strcmp ( sValue, "fieldmask" ) ) m_eRanker = SPH_RANK_FIELDMASK; - else + else if ( !strcmp ( sValue, "sph04" ) ) m_eRanker = SPH_RANK_SPH04; + else if ( !strncmp ( sValue, "expr:", 5 ) ) + { + m_eRanker = SPH_RANK_EXPR; + m_sRankExpr = sValue+5; + } else { snprintf ( m_sParseError, sizeof(m_sParseError), "unknown ranking mode '%s'", sValue ); SPH_RET(false); } } else if ( !strcmp ( sName, "sort" ) ) { - static const struct + static const struct { const char * m_sName; ESphSortOrder m_eSort; - } dSortModes[] = + } dSortModes[] = { { "relevance", SPH_SORT_RELEVANCE }, { "attr_desc:", SPH_SORT_ATTR_DESC }, @@ -1395,10 +1501,10 @@ bool CSphSEQuery::ParseField ( char * sField ) int i; const int nModes = sizeof(dSortModes)/sizeof(dSortModes[0]); for ( i=0; im_sName = chop(sName); pOverride->m_iType = iType; - m_dOverrides.append(pOverride); + m_dOverrides.append ( pOverride ); } ulonglong uId = strtoull ( sId, NULL, 10 ); CSphSEQuery::Override_t::Value_t tValue; - if ( iType == SPH_ATTR_FLOAT ) + if ( iType==SPH_ATTR_FLOAT ) tValue.m_fValue = (float)atof(sValue); - else if ( iType == SPH_ATTR_BIGINT ) + else if ( iType==SPH_ATTR_BIGINT ) tValue.m_iValue64 = strtoll ( sValue, NULL, 10 ); else tValue.m_uValue = (uint32)strtoul ( sValue, NULL, 10 ); - + pOverride->m_dIds.append ( uId ); pOverride->m_dValues.append ( tValue ); } @@ -1674,8 +1783,7 @@ bool CSphSEQuery::ParseField ( char * sField ) SPH_RET(false); } SPH_RET(true); - } - else + } else { snprintf ( m_sParseError, sizeof(m_sParseError), "unknown parameter '%s'", sName ); SPH_RET(false); @@ -1696,7 +1804,7 @@ bool CSphSEQuery::Parse () char * pCur = m_sQueryBuffer; char * pNext = pCur; - while (( pNext = strchr ( pNext, ';' ) )) + while ( ( pNext = strchr ( pNext, ';' ) )!=NULL ) { // handle escaped semicolons if ( pNext>m_sQueryBuffer && pNext[-1]=='\\' && pNext[1]!='\0' ) @@ -1712,6 +1820,8 @@ bool CSphSEQuery::Parse () pCur = pNext; } + SPH_DEBUG ( "q [[ %s ]]", m_sQuery ); + SPH_RET(true); } @@ -1738,14 +1848,17 @@ int CSphSEQuery::BuildRequest ( char ** ppBuffer ) SPH_ENTER_METHOD(); // calc request length - int iReqSize = 124 + 4*m_iWeights + int iReqSize = 128 + 4*m_iWeights + strlen ( m_sSortBy ) + strlen ( m_sQuery ) + strlen ( m_sIndex ) + strlen ( m_sGroupBy ) + strlen ( m_sGroupSortBy ) + strlen ( m_sGroupDistinct ) - + strlen ( m_sComment ); + + strlen ( m_sComment ) + + strlen ( m_sSelect ); + if ( m_eRanker==SPH_RANK_EXPR ) + iReqSize += 4 + strlen(m_sRankExpr); for ( int i=0; im_iType == SPH_ATTR_BIGINT ? 16 : 12; // id64 + value + const uint32 uSize = pOverride->m_iType==SPH_ATTR_BIGINT ? 16 : 12; // id64 + value iReqSize += strlen ( pOverride->m_sName ) + 12 + uSize*pOverride->m_dIds.elements(); } // select iReqSize += 4; - + m_iBufLeft = 0; SafeDeleteArray ( m_pBuf ); @@ -1790,12 +1903,15 @@ int CSphSEQuery::BuildRequest ( char ** ppBuffer ) SendWord ( SEARCHD_COMMAND_SEARCH ); // command id SendWord ( VER_COMMAND_SEARCH ); // command version SendInt ( iReqSize-8 ); // packet body length + SendInt ( 0 ); // its a client SendInt ( 1 ); // number of queries SendInt ( m_iOffset ); SendInt ( m_iLimit ); SendInt ( m_eMode ); SendInt ( m_eRanker ); // 1.16+ + if ( m_eRanker==SPH_RANK_EXPR ) + SendString ( m_sRankExpr ); SendInt ( m_eSort ); SendString ( m_sSortBy ); // sort attr SendString ( m_sQuery ); // query @@ -1878,9 +1994,9 @@ int CSphSEQuery::BuildRequest ( char ** ppBuffer ) for ( int j=0; jm_dIds.elements(); j++ ) { SendUint64 ( pOverride->m_dIds.at(j) ); - if ( pOverride->m_iType == SPH_ATTR_FLOAT ) + if ( pOverride->m_iType==SPH_ATTR_FLOAT ) SendFloat ( pOverride->m_dValues.at(j).m_fValue ); - else if ( pOverride->m_iType == SPH_ATTR_BIGINT ) + else if ( pOverride->m_iType==SPH_ATTR_BIGINT ) SendUint64 ( pOverride->m_dValues.at(j).m_iValue64 ); else SendDword ( pOverride->m_dValues.at(j).m_uValue ); @@ -1888,14 +2004,14 @@ int CSphSEQuery::BuildRequest ( char ** ppBuffer ) } // select - SendString ( "" ); + SendString ( m_sSelect ); // detect buffer overruns and underruns, and report internal error if ( m_bBufOverrun || m_iBufLeft!=0 || m_pCur-m_pBuf!=iReqSize ) SPH_RET(-1); // all fine - SPH_RET(iReqSize); + SPH_RET ( iReqSize ); } ////////////////////////////////////////////////////////////////////////////// @@ -1970,10 +2086,8 @@ int ha_sphinx::open ( const char * name, int, uint ) } -int ha_sphinx::ConnectToSearchd ( const char * sQueryHost, int iQueryPort ) +int ha_sphinx::Connect ( const char * sHost, ushort uPort ) { - SPH_ENTER_METHOD(); - struct sockaddr_in sin; #ifndef __WIN__ struct sockaddr_un saun; @@ -1984,13 +2098,8 @@ int ha_sphinx::ConnectToSearchd ( const char * sQueryHost, int iQueryPort ) struct sockaddr * pSockaddr = NULL; in_addr_t ip_addr; - int version; - uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); - const char * sHost = ( sQueryHost && *sQueryHost ) ? sQueryHost : m_pShare->m_sHost; - ushort iPort = iQueryPort ? (ushort)iQueryPort : m_pShare->m_iPort; - - if ( iPort ) + if ( uPort ) { iDomain = AF_INET; iSockaddrSize = sizeof(sin); @@ -1998,34 +2107,53 @@ int ha_sphinx::ConnectToSearchd ( const char * sQueryHost, int iQueryPort ) memset ( &sin, 0, sizeof(sin) ); sin.sin_family = AF_INET; - sin.sin_port = htons(iPort); - + sin.sin_port = htons(uPort); + // prepare host address - if ( (int)( ip_addr=inet_addr(sHost) ) != (int)INADDR_NONE ) - { + if ( (int)( ip_addr = inet_addr(sHost) )!=(int)INADDR_NONE ) + { memcpy ( &sin.sin_addr, &ip_addr, sizeof(ip_addr) ); } else { int tmp_errno; + bool bError = false; + +#if MYSQL_VERSION_ID>=50515 + struct addrinfo *hp = NULL; + tmp_errno = getaddrinfo ( sHost, NULL, NULL, &hp ); + if ( !tmp_errno || !hp || !hp->ai_addr ) + { + bError = true; + if ( hp ) + freeaddrinfo ( hp ); + } +#else struct hostent tmp_hostent, *hp; char buff2 [ GETHOSTBYNAME_BUFF_SIZE ]; - - hp = my_gethostbyname_r ( sHost, &tmp_hostent, - buff2, sizeof(buff2), &tmp_errno ); + hp = my_gethostbyname_r ( sHost, &tmp_hostent, buff2, sizeof(buff2), &tmp_errno ); if ( !hp ) - { + { my_gethostbyname_r_free(); - + bError = true; + } +#endif + + if ( bError ) + { char sError[256]; my_snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", sHost ); - + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); SPH_RET(-1); } - - memcpy ( &sin.sin_addr, hp->h_addr, - Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); + +#if MYSQL_VERSION_ID>=50515 + memcpy ( &sin.sin_addr, hp->ai_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->ai_addrlen ) ); + freeaddrinfo ( hp ); +#else + memcpy ( &sin.sin_addr, hp->h_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); my_gethostbyname_r_free(); +#endif } } else { @@ -2056,30 +2184,49 @@ int ha_sphinx::ConnectToSearchd ( const char * sQueryHost, int iQueryPort ) { sphSockClose ( iSocket ); my_snprintf ( sError, sizeof(sError), "failed to connect to searchd (host=%s, errno=%d, port=%d)", - sHost, errno, iPort ); + sHost, errno, (int)uPort ); my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); SPH_RET(-1); } + return iSocket; +} + + +int ha_sphinx::ConnectAPI ( const char * sQueryHost, int iQueryPort ) +{ + SPH_ENTER_METHOD(); + + const char * sHost = ( sQueryHost && *sQueryHost ) ? sQueryHost : m_pShare->m_sHost; + ushort uPort = iQueryPort ? (ushort)iQueryPort : m_pShare->m_iPort; + + int iSocket = Connect ( sHost, uPort ); + if ( iSocket<0 ) + SPH_RET ( iSocket ); + + char sError[512]; + + int version; if ( ::recv ( iSocket, (char *)&version, sizeof(version), 0 )!=sizeof(version) ) { sphSockClose ( iSocket ); my_snprintf ( sError, sizeof(sError), "failed to receive searchd version (host=%s, port=%d)", - sHost, iPort ); + sHost, (int)uPort ); my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); SPH_RET(-1); } + uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); if ( ::send ( iSocket, (char*)&uClientVersion, sizeof(uClientVersion), 0 )!=sizeof(uClientVersion) ) { sphSockClose ( iSocket ); my_snprintf ( sError, sizeof(sError), "failed to send client version (host=%s, port=%d)", - sHost, iPort ); + sHost, (int)uPort ); my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); SPH_RET(-1); } - SPH_RET(iSocket); + SPH_RET ( iSocket ); } @@ -2094,25 +2241,182 @@ int ha_sphinx::ConnectToSearchd ( const char * sQueryHost, int iQueryPort ) int ha_sphinx::close() { SPH_ENTER_METHOD(); - SPH_RET ( free_share(m_pShare) ); + SPH_RET ( free_share ( m_pShare ) ); } -int ha_sphinx::write_row ( uchar * ) +int ha_sphinx::HandleMysqlError ( MYSQL * pConn, int iErrCode ) +{ + CSphSEThreadData * pTls = GetTls (); + if ( pTls ) + { + strncpy ( pTls->m_tStats.m_sLastMessage, mysql_error ( pConn ), sizeof ( pTls->m_tStats.m_sLastMessage ) ); + pTls->m_tStats.m_bLastError = true; + } + + mysql_close ( pConn ); + + my_error ( iErrCode, MYF(0), pTls->m_tStats.m_sLastMessage ); + return -1; +} + + +int ha_sphinx::extra ( enum ha_extra_function op ) +{ + CSphSEThreadData * pTls = GetTls(); + if ( pTls ) + { + if ( op==HA_EXTRA_WRITE_CAN_REPLACE ) + pTls->m_bReplace = true; + else if ( op==HA_EXTRA_WRITE_CANNOT_REPLACE ) + pTls->m_bReplace = false; + } + return 0; +} + + +int ha_sphinx::write_row ( byte * ) { SPH_ENTER_METHOD(); - SPH_RET ( HA_ERR_WRONG_COMMAND ); + if ( !m_pShare || !m_pShare->m_bSphinxQL ) + SPH_RET ( HA_ERR_WRONG_COMMAND ); + + // SphinxQL inserts only, pretty much similar to abandoned federated + char sQueryBuf[1024]; + char sValueBuf[1024]; + + String sQuery ( sQueryBuf, sizeof(sQueryBuf), &my_charset_bin ); + String sValue ( sValueBuf, sizeof(sQueryBuf), &my_charset_bin ); + sQuery.length ( 0 ); + sValue.length ( 0 ); + + CSphSEThreadData * pTls = GetTls (); + sQuery.append ( pTls && pTls->m_bReplace ? "REPLACE INTO " : "INSERT INTO " ); + sQuery.append ( m_pShare->m_sIndex ); + sQuery.append ( " (" ); + + for ( Field ** ppField = table->field; *ppField; ppField++ ) + { + sQuery.append ( (*ppField)->field_name ); + if ( ppField[1] ) + sQuery.append ( ", " ); + } + sQuery.append ( ") VALUES (" ); + + for ( Field ** ppField = table->field; *ppField; ppField++ ) + { + if ( (*ppField)->is_null() ) + { + sQuery.append ( "''" ); + + } else + { + if ( (*ppField)->type()==MYSQL_TYPE_TIMESTAMP ) + { + Item_field * pWrap = new Item_field ( *ppField ); // autofreed by query arena, I assume + Item_func_unix_timestamp * pConv = new Item_func_unix_timestamp ( pWrap ); + pConv->quick_fix_field(); + unsigned int uTs = (unsigned int) pConv->val_int(); + + snprintf ( sValueBuf, sizeof(sValueBuf), "'%u'", uTs ); + sQuery.append ( sValueBuf ); + + } else + { + (*ppField)->val_str ( &sValue ); + sQuery.append ( "'" ); + sValue.print ( &sQuery ); + sQuery.append ( "'" ); + sValue.length(0); + } + } + + if ( ppField[1] ) + sQuery.append ( ", " ); + } + sQuery.append ( ")" ); + + // FIXME? pretty inefficient to reconnect every time under high load, + // but this was intentionally written for a low load scenario.. + MYSQL * pConn = mysql_init ( NULL ); + if ( !pConn ) + SPH_RET ( ER_OUT_OF_RESOURCES ); + + unsigned int uTimeout = 1; + mysql_options ( pConn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&uTimeout ); + + 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 ) ); + + if ( mysql_real_query ( pConn, sQuery.ptr(), sQuery.length() ) ) + SPH_RET ( HandleMysqlError ( pConn, ER_QUERY_ON_FOREIGN_DATA_SOURCE ) ); + + // all ok! + mysql_close ( pConn ); + SPH_RET(0); } -int ha_sphinx::update_row ( const uchar *, uchar * ) +static inline bool IsIntegerFieldType ( enum_field_types eType ) +{ + return eType==MYSQL_TYPE_LONG || eType==MYSQL_TYPE_LONGLONG; +} + + +static inline bool IsIDField ( Field * pField ) +{ + enum_field_types eType = pField->type(); + + if ( eType==MYSQL_TYPE_LONGLONG ) + return true; + + if ( eType==MYSQL_TYPE_LONG && ((Field_num*)pField)->unsigned_flag ) + return true; + + return false; +} + + +int ha_sphinx::delete_row ( const byte * ) { SPH_ENTER_METHOD(); - SPH_RET ( HA_ERR_WRONG_COMMAND ); + if ( !m_pShare || !m_pShare->m_bSphinxQL ) + SPH_RET ( HA_ERR_WRONG_COMMAND ); + + char sQueryBuf[1024]; + String sQuery ( sQueryBuf, sizeof(sQueryBuf), &my_charset_bin ); + sQuery.length ( 0 ); + + sQuery.append ( "DELETE FROM " ); + sQuery.append ( m_pShare->m_sIndex ); + sQuery.append ( " WHERE id=" ); + + char sValue[32]; + snprintf ( sValue, sizeof(sValue), "%lld", table->field[0]->val_int() ); + sQuery.append ( sValue ); + + // FIXME? pretty inefficient to reconnect every time under high load, + // but this was intentionally written for a low load scenario.. + MYSQL * pConn = mysql_init ( NULL ); + if ( !pConn ) + SPH_RET ( ER_OUT_OF_RESOURCES ); + + unsigned int uTimeout = 1; + mysql_options ( pConn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&uTimeout ); + + 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 ) ); + + if ( mysql_real_query ( pConn, sQuery.ptr(), sQuery.length() ) ) + SPH_RET ( HandleMysqlError ( pConn, ER_QUERY_ON_FOREIGN_DATA_SOURCE ) ); + + // all ok! + mysql_close ( pConn ); + SPH_RET(0); } -int ha_sphinx::delete_row ( const uchar * ) +int ha_sphinx::update_row ( const byte *, byte * ) { SPH_ENTER_METHOD(); SPH_RET ( HA_ERR_WRONG_COMMAND ); @@ -2125,6 +2429,11 @@ int ha_sphinx::index_init ( uint keynr, bool ) { SPH_ENTER_METHOD(); active_index = keynr; + + CSphSEThreadData * pTls = GetTls(); + if ( pTls ) + pTls->m_bCondDone = false; + SPH_RET(0); } @@ -2136,17 +2445,28 @@ int ha_sphinx::index_end() } -uint32 ha_sphinx::UnpackDword () +bool ha_sphinx::CheckResponcePtr ( int iLen ) { - if ( m_pCur+sizeof(uint32)>m_pResponseEnd ) + if ( m_pCur+iLen>m_pResponseEnd ) { m_pCur = m_pResponseEnd; m_bUnpackError = true; + return false; + } + + return true; +} + + +uint32 ha_sphinx::UnpackDword () +{ + if ( !CheckResponcePtr ( sizeof(uint32) ) ) // NOLINT + { return 0; } uint32 uRes = ntohl ( sphUnalignedRead ( *(uint32*)m_pCur ) ); - m_pCur += sizeof(uint32); + m_pCur += sizeof(uint32); // NOLINT return uRes; } @@ -2157,10 +2477,8 @@ char * ha_sphinx::UnpackString () if ( !iLen ) return NULL; - if ( m_pCur+iLen>m_pResponseEnd ) + if ( !CheckResponcePtr ( iLen ) ) { - m_pCur = m_pResponseEnd; - m_bUnpackError = true; return NULL; } @@ -2270,7 +2588,7 @@ bool ha_sphinx::UnpackSchema () m_iMatchesTotal = UnpackDword (); m_bId64 = UnpackDword (); - if ( m_bId64 && m_pShare->m_eTableFieldType[0] != MYSQL_TYPE_LONGLONG ) + if ( m_bId64 && m_pShare->m_eTableFieldType[0]!=MYSQL_TYPE_LONGLONG ) { my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: 1st column must be bigint to accept 64-bit DOCIDs" ); SPH_RET(false); @@ -2299,7 +2617,7 @@ bool ha_sphinx::UnpackSchema () if ( m_bUnpackError ) my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: UnpackSchema() failed (unpack error)" ); - SPH_RET(!m_bUnpackError); + SPH_RET ( !m_bUnpackError ); } @@ -2308,22 +2626,25 @@ bool ha_sphinx::UnpackStats ( CSphSEStats * pStats ) assert ( pStats ); char * pCurSave = m_pCur; - for ( uint i=0; im_iMatchesTotal = UnpackDword (); pStats->m_iMatchesFound = UnpackDword (); pStats->m_iQueryMsec = UnpackDword (); @@ -2356,37 +2677,61 @@ 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; if ( condf->functype()!=Item_func::EQ_FUNC || condf->argument_count()!=2 ) break; - Item ** args = condf->arguments(); - if ( args[0]->type()!=COND::FIELD_ITEM || args[1]->type()!=COND::STRING_ITEM ) - break; - - Item_field * pField = (Item_field *) args[0]; - if ( pField->field->field_index!=2 ) // FIXME! magic key index - break; - // get my tls CSphSEThreadData * pTls = GetTls (); if ( !pTls ) break; - // copy the query, and let know that we intercepted this condition - Item_string * pString = (Item_string *) args[1]; - pTls->m_bQuery = true; - strncpy ( pTls->m_sQuery, pString->str_value.c_ptr(), sizeof(pTls->m_sQuery) ); - pTls->m_sQuery[sizeof(pTls->m_sQuery)-1] = '\0'; - pTls->m_pQueryCharset = pString->str_value.charset(); + Item ** args = condf->arguments(); + if ( !m_pShare->m_bSphinxQL ) + { + // on non-QL tables, intercept query=value condition for SELECT + if (!( args[0]->type()==Item::FIELD_ITEM && args[1]->type()==Item::STRING_ITEM )) + break; + + Item_field * pField = (Item_field *) args[0]; + if ( pField->field->field_index!=2 ) // FIXME! magic key index + break; + + // copy the query, and let know that we intercepted this condition + Item_string * pString = (Item_string *) args[1]; + pTls->m_bQuery = true; + strncpy ( pTls->m_sQuery, pString->str_value.c_ptr(), sizeof(pTls->m_sQuery) ); + pTls->m_sQuery[sizeof(pTls->m_sQuery)-1] = '\0'; + pTls->m_pQueryCharset = pString->str_value.charset(); + + } else + { + if (!( args[0]->type()==Item::FIELD_ITEM && args[1]->type()==Item::INT_ITEM )) + break; + + // on QL tables, intercept id=value condition for DELETE + Item_field * pField = (Item_field *) args[0]; + if ( pField->field->field_index!=0 ) // FIXME! magic key index + break; + + Item_int * pVal = (Item_int *) args[1]; + pTls->m_iCondId = pVal->val_int(); + pTls->m_bCondId = true; + } + + // we intercepted this condition return NULL; } @@ -2399,9 +2744,8 @@ const COND * ha_sphinx::cond_push ( const COND * cond ) void ha_sphinx::cond_pop () { CSphSEThreadData * pTls = GetTls (); - if ( pTls && pTls->m_bQuery ) + if ( pTls ) pTls->m_bQuery = false; - return; } @@ -2442,6 +2786,38 @@ int ha_sphinx::index_read ( byte * buf, const byte * key, uint key_len, enum ha_ } pTls->m_tStats.Reset (); + // sphinxql table, just return the key once + if ( m_pShare->m_bSphinxQL ) + { + // over and out + if ( pTls->m_bCondDone ) + SPH_RET ( HA_ERR_END_OF_FILE ); + + // return a value from pushdown, if any + if ( pTls->m_bCondId ) + { + table->field[0]->store ( pTls->m_iCondId, 1 ); + pTls->m_bCondDone = true; + SPH_RET(0); + } + + // return a value from key + longlong iRef = 0; + if ( key_len==4 ) + iRef = uint4korr ( key ); + else if ( key_len==8 ) + iRef = uint8korr ( key ); + else + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: unexpected key length" ); + SPH_RET ( HA_ERR_END_OF_FILE ); + } + + table->field[0]->store ( iRef, 1 ); + pTls->m_bCondDone = true; + SPH_RET(0); + } + // parse query if ( pTls->m_bQuery ) { @@ -2464,7 +2840,7 @@ int ha_sphinx::index_read ( byte * buf, const byte * key, uint key_len, enum ha_ } // do connect - int iSocket = ConnectToSearchd ( q.m_sHost, q.m_iPort ); + int iSocket = ConnectAPI ( q.m_sHost, q.m_iPort ); if ( iSocket<0 ) SPH_RET ( HA_ERR_END_OF_FILE ); @@ -2602,7 +2978,7 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) if ( m_iCurrentPos>=m_iMatchesTotal ) { SafeDeleteArray ( m_pResponse ); - SPH_RET ( HA_ERR_END_OF_FILE ); + SPH_RET ( HA_ERR_END_OF_FILE ); } #if MYSQL_VERSION_ID>50100 @@ -2622,16 +2998,21 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) for ( uint32 i=0; i0 && !m_bUnpackError; uValue-- ) UnpackDword(); + } else if ( m_dAttrs[i].m_uType==SPH_ATTR_STRING && CheckResponcePtr ( uValue ) ) + { + m_pCur += uValue; + } continue; } @@ -2659,7 +3040,18 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) af->store ( iValue64, 0 ); break; - case ( SPH_ATTR_MULTI | SPH_ATTR_INTEGER ): + case SPH_ATTR_STRING: + if ( !uValue ) + af->store ( "", 0, &my_charset_bin ); + else if ( CheckResponcePtr ( uValue ) ) + { + af->store ( m_pCur, uValue, &my_charset_bin ); + m_pCur += uValue; + } + break; + + case SPH_ATTR_UINT64SET: + case SPH_ATTR_UINT32SET : if ( uValue<=0 ) { // shortcut, empty MVA set @@ -2671,15 +3063,32 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) char sBuf[1024]; // FIXME! magic size char * pCur = sBuf; - for ( ; uValue>0 && !m_bUnpackError; uValue-- ) + if ( m_dAttrs[i].m_uType==SPH_ATTR_UINT32SET ) { - uint32 uEntry = UnpackDword (); - if ( pCur < sBuf+sizeof(sBuf)-16 ) // 10 chars per 32bit value plus some safety bytes + for ( ; uValue>0 && !m_bUnpackError; uValue-- ) { - sprintf ( pCur, "%u", uEntry ); - while ( *pCur ) *pCur++; - if ( uValue>1 ) - *pCur++ = ','; // non-trailing commas + uint32 uEntry = UnpackDword (); + if ( pCur < sBuf+sizeof(sBuf)-16 ) // 10 chars per 32bit value plus some safety bytes + { + snprintf ( pCur, sBuf+sizeof(sBuf)-pCur, "%u", uEntry ); + while ( *pCur ) *pCur++; + if ( uValue>1 ) + *pCur++ = ','; // non-trailing commas + } + } + } else + { + for ( ; uValue>0 && !m_bUnpackError; uValue-=2 ) + { + uint32 uEntryLo = UnpackDword (); + uint32 uEntryHi = UnpackDword(); + if ( pCur < sBuf+sizeof(sBuf)-24 ) // 20 chars per 64bit value plus some safety bytes + { + snprintf ( pCur, sBuf+sizeof(sBuf)-pCur, "%u%u", uEntryHi, uEntryLo ); + while ( *pCur ) *pCur++; + if ( uValue>2 ) + *pCur++ = ','; // non-trailing commas + } } } @@ -2690,7 +3099,7 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) default: my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: unhandled attr type" ); SafeDeleteArray ( m_pResponse ); - SPH_RET ( HA_ERR_END_OF_FILE ); + SPH_RET ( HA_ERR_END_OF_FILE ); } } @@ -2698,7 +3107,7 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) { my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: response unpacker failed" ); SafeDeleteArray ( m_pResponse ); - SPH_RET ( HA_ERR_END_OF_FILE ); + SPH_RET ( HA_ERR_END_OF_FILE ); } // zero out unmapped fields @@ -2719,7 +3128,7 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) m_iCurrentPos++; #if MYSQL_VERSION_ID > 50100 - dbug_tmp_restore_column_map(table->write_set, org_bitmap); + dbug_tmp_restore_column_map ( table->write_set, org_bitmap ); #endif SPH_RET(0); @@ -2859,7 +3268,7 @@ THR_LOCK_DATA ** ha_sphinx::store_lock ( THD *, THR_LOCK_DATA ** to, SPH_ENTER_METHOD(); if ( lock_type!=TL_IGNORE && m_tLock.type==TL_UNLOCK ) - m_tLock.type=lock_type; + m_tLock.type = lock_type; *to++ = &m_tLock; SPH_RET(to); @@ -2898,12 +3307,9 @@ ha_rows ha_sphinx::records_in_range ( uint, key_range *, key_range * ) SPH_RET(3); // low number to force index usage } - -static inline bool IsIntegerFieldType ( enum_field_types eType ) -{ - return eType==MYSQL_TYPE_LONG || eType==MYSQL_TYPE_LONGLONG; -} - +#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 @@ -2918,10 +3324,12 @@ int ha_sphinx::create ( const char * name, TABLE * table, HA_CREATE_INFO * ) SPH_ENTER_METHOD(); char sError[256]; - if ( !ParseUrl ( NULL, table, true ) ) + CSphSEShare tInfo; + if ( !ParseUrl ( &tInfo, table, true ) ) SPH_RET(-1); - for ( ;; ) + // check SphinxAPI table + for ( ; !tInfo.m_bSphinxQL; ) { // check system fields (count and types) if ( table->s->fieldsfield[0]->type() ) || !((Field_num *)table->field[0])->unsigned_flag ) + if ( !IsIDField ( table->field[0] ) ) { my_snprintf ( sError, sizeof(sError), "%s: 1st column (docid) MUST be unsigned integer or bigint", name ); break; @@ -2970,7 +3378,7 @@ int ha_sphinx::create ( const char * name, TABLE * table, HA_CREATE_INFO * ) // check index if ( table->s->keys!=1 || - table->key_info[0].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", @@ -2982,6 +3390,54 @@ int ha_sphinx::create ( const char * name, TABLE * table, HA_CREATE_INFO * ) sError[0] = '\0'; break; } + + // check SphinxQL table + for ( ; tInfo.m_bSphinxQL; ) + { + sError[0] = '\0'; + + // check that 1st column is id, is of int type, and has an index + if ( strcmp ( table->field[0]->field_name, "id" ) ) + { + my_snprintf ( sError, sizeof(sError), "%s: 1st column must be called 'id'", name ); + break; + } + + if ( !IsIDField ( table->field[0] ) ) + { + my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be INT UNSIGNED or BIGINT", name ); + break; + } + + // check index + if ( + table->s->keys!=1 || + table->key_info[0].user_defined_key_parts!=1 || + strcasecmp ( table->key_info[0].key_part[0].field->field_name, "id" ) ) + { + my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be indexed", name ); + break; + } + + // check column types + for ( int i=1; i<(int)table->s->fields; i++ ) + { + enum_field_types eType = table->field[i]->type(); + if ( eType!=MYSQL_TYPE_TIMESTAMP && !IsIntegerFieldType(eType) && eType!=MYSQL_TYPE_VARCHAR && eType!=MYSQL_TYPE_FLOAT ) + { + my_snprintf ( sError, sizeof(sError), "%s: column %d(%s) is of unsupported type (use int/bigint/timestamp/varchar/float)", + name, i+1, table->field[i]->field_name ); + break; + } + } + if ( sError[0] ) + break; + + // all good + break; + } + + // report and bail if ( sError[0] ) { my_error ( ER_CANT_CREATE_TABLE, MYF(0), sError, -1 ); @@ -2991,15 +3447,15 @@ int ha_sphinx::create ( const char * name, TABLE * table, HA_CREATE_INFO * ) SPH_RET(0); } -//// show functions +// show functions -#if MYSQL_VERSION_ID<50100 +#if MYSQL_VERSION_ID<50100 #define SHOW_VAR_FUNC_BUFF_SIZE 1024 #endif CSphSEStats * sphinx_get_stats ( THD * thd, SHOW_VAR * out ) { -#if MYSQL_VERSION_ID>50100 +#if MYSQL_VERSION_ID>50100 if ( sphinx_hton_ptr ) { CSphSEThreadData *pTls = (CSphSEThreadData *) *thd_ha_data ( thd, sphinx_hton_ptr ); @@ -3012,7 +3468,7 @@ CSphSEStats * sphinx_get_stats ( THD * thd, SHOW_VAR * out ) if ( pTls && pTls->m_bStats ) return &pTls->m_tStats; #endif - + out->type = SHOW_CHAR; out->value = ""; return 0; @@ -3064,24 +3520,24 @@ int sphinx_showfunc_word_count ( THD * thd, SHOW_VAR * out, char * ) int sphinx_showfunc_words ( THD * thd, SHOW_VAR * out, char * sBuffer ) { -#if MYSQL_VERSION_ID>50100 +#if MYSQL_VERSION_ID>50100 if ( sphinx_hton_ptr ) { CSphSEThreadData * pTls = (CSphSEThreadData *) *thd_ha_data ( thd, sphinx_hton_ptr ); #else { CSphSEThreadData * pTls = (CSphSEThreadData *) thd->ha_data[sphinx_hton.slot]; -#endif +#endif if ( pTls && pTls->m_bStats ) { CSphSEStats * pStats = &pTls->m_tStats; if ( pStats && pStats->m_iWords ) { uint uBuffLen = 0; - + out->type = SHOW_CHAR; out->value = sBuffer; - + // the following is partially based on code in sphinx_show_status() sBuffer[0] = 0; for ( int i=0; im_iWords; i++ ) @@ -3095,13 +3551,13 @@ int sphinx_showfunc_words ( THD * thd, SHOW_VAR * out, char * sBuffer ) { // trim last space sBuffer [ --uBuffLen ] = 0; - + if ( pTls->m_pQueryCharset ) { // String::c_ptr() will nul-terminate the buffer. // // NOTE: It's not entirely clear whether this conversion is necessary at all. - + String sConvert; uint iErrors; sConvert.copy ( sBuffer, uBuffLen, pTls->m_pQueryCharset, system_charset_info, &iErrors ); @@ -3129,7 +3585,7 @@ int sphinx_showfunc_error ( THD * thd, SHOW_VAR * out, char * ) } return 0; } - + #if MYSQL_VERSION_ID>50100 struct st_mysql_storage_engine sphinx_storage_engine = { @@ -3168,5 +3624,5 @@ mysql_declare_plugin_end; #endif // >50100 // -// $Id$ +// $Id: ha_sphinx.cc 4507 2014-01-22 15:24:34Z deogar $ // diff --git a/ha_sphinx.h b/ha_sphinx.h index b514e2a669c..4ed6b1c955d 100644 --- a/ha_sphinx.h +++ b/ha_sphinx.h @@ -1,5 +1,5 @@ // -// $Id$ +// $Id: ha_sphinx.h 3866 2013-05-22 11:54:20Z kevg $ // #ifdef USE_PRAGMA_INTERFACE @@ -7,7 +7,9 @@ #endif -#if MYSQL_VERSION_ID>50100 +#if MYSQL_VERSION_ID>=50515 +#define TABLE_ARG TABLE_SHARE +#elif MYSQL_VERSION_ID>50100 #define TABLE_ARG st_table_share #else #define TABLE_ARG st_table @@ -47,7 +49,7 @@ protected: public: #if MYSQL_VERSION_ID<50100 - ha_sphinx ( TABLE_ARG * table_arg ); + ha_sphinx ( TABLE_ARG * table_arg ); // NOLINT #else ha_sphinx ( handlerton * hton, TABLE_ARG * table_arg ); #endif @@ -82,14 +84,15 @@ public: int open ( const char * name, int mode, uint test_if_locked ); int close (); - int write_row ( uchar * buf ); - int update_row ( const uchar * old_data, uchar * new_data ); - int delete_row ( const uchar * buf ); + int write_row ( byte * buf ); + int update_row ( const byte * old_data, byte * new_data ); + int delete_row ( const byte * buf ); + int extra ( enum ha_extra_function op ); int index_init ( uint keynr, bool sorted ); // 5.1.x int index_init ( uint keynr ) { return index_init ( keynr, false ); } // 5.0.x - int index_end (); + int index_end (); int index_read ( byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag ); int index_read_idx ( byte * buf, uint idx, const byte * key, uint key_len, enum ha_rkey_function find_flag ); int index_next ( byte * buf ); @@ -121,10 +124,14 @@ public: int rename_table ( const char * from, const char * to ); int create ( const char * name, TABLE * form, HA_CREATE_INFO * create_info ); - THR_LOCK_DATA **store_lock ( THD * thd, THR_LOCK_DATA ** to, enum thr_lock_type lock_type ); + 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: @@ -138,12 +145,15 @@ private: int * m_dUnboundFields; private: - int ConnectToSearchd ( const char * sQueryHost, int iQueryPort ); + int Connect ( const char * sQueryHost, ushort uPort ); + int ConnectAPI ( const char * sQueryHost, int iQueryPort ); + int HandleMysqlError ( struct st_mysql * pConn, int iErrCode ); uint32 UnpackDword (); char * UnpackString (); bool UnpackSchema (); bool UnpackStats ( CSphSEStats * pStats ); + bool CheckResponcePtr ( int iLen ); CSphSEThreadData * GetTls (); }; @@ -160,5 +170,5 @@ int sphinx_showfunc_word_count ( THD *, SHOW_VAR *, char * ); int sphinx_showfunc_words ( THD *, SHOW_VAR *, char * ); // -// $Id$ +// $Id: ha_sphinx.h 3866 2013-05-22 11:54:20Z kevg $ // diff --git a/make-patch.sh b/make-patch.sh old mode 100644 new mode 100755 diff --git a/snippets_udf.cc b/snippets_udf.cc index cf7ca1a7c97..094370ae9d8 100644 --- a/snippets_udf.cc +++ b/snippets_udf.cc @@ -1,766 +1,816 @@ -// -// $Id$ -// - -// -// Copyright (c) 2001-2008, Andrew Aksyonoff. 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. You should have -// received a copy of the GPL license along with this program; if you -// did not, you can find it at http://www.gnu.org/ -// - -#include -#include -#include - -#include -#include - -#include - -#if MYSQL_VERSION_ID>50100 -#include "mysql_priv.h" -#include -#else -#include "../mysql_priv.h" -#endif - -#include -#include - -#if MYSQL_VERSION_ID>=50120 -typedef uchar byte; -#endif - -/// partially copy-pasted stuff that should be moved elsewhere - -#if UNALIGNED_RAM_ACCESS - -/// pass-through wrapper -template < typename T > inline T sphUnalignedRead ( const T & tRef ) -{ - return tRef; -} - -/// pass-through wrapper -template < typename T > void sphUnalignedWrite ( void * pPtr, const T & tVal ) -{ - *(T*)pPtr = tVal; -} - -#else - -/// unaligned read wrapper for some architectures (eg. SPARC) -template < typename T > -inline T sphUnalignedRead ( const T & tRef ) -{ - T uTmp; - byte * pSrc = (byte *) &tRef; - byte * pDst = (byte *) &uTmp; - for ( int i=0; i<(int)sizeof(T); i++ ) - *pDst++ = *pSrc++; - return uTmp; -} - -/// unaligned write wrapper for some architectures (eg. SPARC) -template < typename T > -void sphUnalignedWrite ( void * pPtr, const T & tVal ) -{ - byte * pDst = (byte *) pPtr; - byte * pSrc = (byte *) &tVal; - for ( int i=0; i<(int)sizeof(T); i++ ) - *pDst++ = *pSrc++; -} - -#endif - -#define SPHINXSE_MAX_ALLOC (16*1024*1024) - -#define SafeDelete(_arg) { if ( _arg ) delete ( _arg ); (_arg) = NULL; } -#define SafeDeleteArray(_arg) { if ( _arg ) delete [] ( _arg ); (_arg) = NULL; } - -#define Min(a,b) ((a)<(b)?(a):(b)) - -typedef unsigned int DWORD; - -inline DWORD sphF2DW ( float f ) { union { float f; uint32 d; } u; u.f = f; return u.d; } - -static char * sphDup ( const char * sSrc, int iLen=-1 ) -{ - if ( !sSrc ) - return NULL; - - if ( iLen<0 ) - iLen = strlen(sSrc); - - char * sRes = new char [ 1+iLen ]; - memcpy ( sRes, sSrc, iLen ); - sRes[iLen] = '\0'; - return sRes; -} - -static inline void sphShowErrno ( const char * sCall ) -{ - char sError[256]; - snprintf ( sError, sizeof(sError), "%s() failed: [%d] %s", sCall, errno, strerror(errno) ); - my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sError ); -} - -static const bool sphReportErrors = true; - -static bool sphSend ( int iFd, const char * pBuffer, int iSize, bool bReportErrors = false ) -{ - assert ( pBuffer ); - assert ( iSize > 0 ); - - const int iResult = send ( iFd, pBuffer, iSize, 0 ); - if ( iResult != iSize ) - { - if ( bReportErrors ) sphShowErrno("send"); - return false; - } - return true; -} - -static bool sphRecv ( int iFd, char * pBuffer, int iSize, bool bReportErrors = false ) -{ - assert ( pBuffer ); - assert ( iSize > 0 ); - - while ( iSize ) - { - const int iResult = recv ( iFd, pBuffer, iSize, 0 ); - if ( iResult > 0 ) - { - iSize -= iResult; - pBuffer += iSize; - } - else if ( iResult == 0 ) - { - if ( bReportErrors ) - my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), "recv() failed: disconnected" ); - return false; - } - else - { - if ( bReportErrors ) sphShowErrno("recv"); - return false; - } - } - return true; -} - -enum -{ - SPHINX_SEARCHD_PROTO = 1, - - SEARCHD_COMMAND_SEARCH = 0, - SEARCHD_COMMAND_EXCERPT = 1, - - VER_COMMAND_SEARCH = 0x116, - VER_COMMAND_EXCERPT = 0x100, -}; - -/// known answers -enum -{ - SEARCHD_OK = 0, ///< general success, command-specific reply follows - SEARCHD_ERROR = 1, ///< general failure, error message follows - SEARCHD_RETRY = 2, ///< temporary failure, error message follows, client should retry later - SEARCHD_WARNING = 3 ///< general success, warning message and command-specific reply follow -}; - -#define SPHINXSE_DEFAULT_SCHEME "sphinx" -#define SPHINXSE_DEFAULT_HOST "127.0.0.1" -#define SPHINXSE_DEFAULT_PORT 9312 -#define SPHINXSE_DEFAULT_INDEX "*" - -class CSphBuffer -{ -private: - bool m_bOverrun; - int m_iSize; - int m_iLeft; - char * m_pBuffer; - char * m_pCurrent; - -public: - CSphBuffer ( const int iSize ) - : m_bOverrun ( false ) - , m_iSize ( iSize ) - , m_iLeft ( iSize ) - { - assert ( iSize > 0 ); - m_pBuffer = new char[iSize]; - m_pCurrent = m_pBuffer; - } - - ~CSphBuffer () - { - SafeDelete ( m_pBuffer ); - } - - const char * Ptr() const { return m_pBuffer; } - - bool Finalize() - { - return !( m_bOverrun || m_iLeft != 0 || m_pCurrent - m_pBuffer != m_iSize ); - } - - void SendBytes ( const void * pBytes, int iBytes ); - - void SendWord ( short int v ) { v = ntohs(v); SendBytes ( &v, sizeof(v) ); } - void SendInt ( int v ) { v = ntohl(v); SendBytes ( &v, sizeof(v) ); } - void SendDword ( DWORD v ) { v = ntohl(v) ;SendBytes ( &v, sizeof(v) ); } - void SendUint64 ( ulonglong v ) { SendDword ( uint(v>>32) ); SendDword ( uint(v&0xFFFFFFFFUL) ); } - void SendString ( const char * v ) { SendString ( v, strlen(v) ); } - void SendString ( const char * v, int iLen ) { SendDword(iLen); SendBytes ( v, iLen ); } - void SendFloat ( float v ) { SendDword ( sphF2DW(v) ); } -}; - -void CSphBuffer::SendBytes ( const void * pBytes, int iBytes ) -{ - if ( m_iLeft < iBytes ) - { - m_bOverrun = true; - return; - } - - memcpy ( m_pCurrent, pBytes, iBytes ); - - m_pCurrent += iBytes; - m_iLeft -= iBytes; -} - -struct CSphUrl -{ - char * m_sBuffer; - char * m_sFormatted; - - char * m_sScheme; - char * m_sHost; - char * m_sIndex; - - int m_iPort; - - CSphUrl() - : m_sBuffer ( NULL ) - , m_sFormatted ( NULL ) - , m_sScheme ( SPHINXSE_DEFAULT_SCHEME ) - , m_sHost ( SPHINXSE_DEFAULT_HOST ) - , m_sIndex ( SPHINXSE_DEFAULT_INDEX ) - , m_iPort ( SPHINXSE_DEFAULT_PORT ) - {} - - ~CSphUrl() - { - SafeDeleteArray ( m_sFormatted ); - SafeDeleteArray ( m_sBuffer ); - } - - bool Parse ( const char * sUrl, int iLen ); - int Connect(); - const char * Format(); -}; - -const char * CSphUrl::Format() -{ - if ( !m_sFormatted ) - { - int iSize = 15 + strlen(m_sHost) + strlen(m_sIndex); - m_sFormatted = new char [ iSize ]; - if ( m_iPort ) - snprintf ( m_sFormatted, iSize, "inet://%s:%d/%s", m_sHost, m_iPort, m_sIndex ); - else - snprintf ( m_sFormatted, iSize, "unix://%s/%s", m_sHost, m_sIndex ); - } - return m_sFormatted; -} - -// the following scheme variants are recognized -// -// inet://host/index -// inet://host:port/index -// unix://unix/domain/socket:index -// unix://unix/domain/socket -bool CSphUrl::Parse ( const char * sUrl, int iLen ) -{ - bool bOk = true; - while ( iLen ) - { - bOk = false; - - m_sBuffer = sphDup ( sUrl, iLen ); - m_sScheme = m_sBuffer; - - m_sHost = strstr ( m_sBuffer, "://" ); - if ( !m_sHost ) - break; - m_sHost[0] = '\0'; - m_sHost += 2; - - if ( !strcmp ( m_sScheme, "unix" ) ) - { - // unix-domain socket - m_iPort = 0; - if (!( m_sIndex = strrchr ( m_sHost, ':' ) )) - m_sIndex = SPHINXSE_DEFAULT_INDEX; - else - { - *m_sIndex++ = '\0'; - if ( !*m_sIndex ) - m_sIndex = SPHINXSE_DEFAULT_INDEX; - } - bOk = true; - break; - } - if( strcmp ( m_sScheme, "sphinx" ) != 0 && strcmp ( m_sScheme, "inet" ) != 0 ) - break; - - // inet - m_sHost++; - char * sPort = strchr ( m_sHost, ':' ); - if ( sPort ) - { - *sPort++ = '\0'; - if ( *sPort ) - { - m_sIndex = strchr ( sPort, '/' ); - if ( m_sIndex ) - *m_sIndex++ = '\0'; - else - m_sIndex = SPHINXSE_DEFAULT_INDEX; - - m_iPort = atoi(sPort); - if ( !m_iPort ) - m_iPort = SPHINXSE_DEFAULT_PORT; - } - } else - { - m_sIndex = strchr ( m_sHost, '/' ); - if ( m_sIndex ) - *m_sIndex++ = '\0'; - else - m_sIndex = SPHINXSE_DEFAULT_INDEX; - } - - bOk = true; - break; - } - - return bOk; -} - -int CSphUrl::Connect() -{ - struct sockaddr_in sin; -#ifndef __WIN__ - struct sockaddr_un saun; -#endif - - int iDomain = 0; - int iSockaddrSize = 0; - struct sockaddr * pSockaddr = NULL; - - in_addr_t ip_addr; - - if ( m_iPort ) - { - iDomain = AF_INET; - iSockaddrSize = sizeof(sin); - pSockaddr = (struct sockaddr *) &sin; - - memset ( &sin, 0, sizeof(sin) ); - sin.sin_family = AF_INET; - sin.sin_port = htons(m_iPort); - - // resolve address - if ( (int)( ip_addr=inet_addr(m_sHost) ) != (int)INADDR_NONE ) - memcpy ( &sin.sin_addr, &ip_addr, sizeof(ip_addr) ); - else - { - int tmp_errno; - struct hostent tmp_hostent, *hp; - char buff2 [ GETHOSTBYNAME_BUFF_SIZE ]; - - hp = my_gethostbyname_r ( m_sHost, &tmp_hostent, - buff2, sizeof(buff2), &tmp_errno ); - if ( !hp ) - { - my_gethostbyname_r_free(); - - char sError[256]; - snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", m_sHost ); - - my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); - return -1; - } - - memcpy ( &sin.sin_addr, hp->h_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); - my_gethostbyname_r_free(); - } - } - else - { -#ifndef __WIN__ - iDomain = AF_UNIX; - iSockaddrSize = sizeof(saun); - pSockaddr = (struct sockaddr *) &saun; - - memset ( &saun, 0, sizeof(saun) ); - saun.sun_family = AF_UNIX; - strncpy ( saun.sun_path, m_sHost, sizeof(saun.sun_path)-1 ); -#else - my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), "Unix-domain sockets are not supported on Windows" ); - return -1; -#endif - } - - // connect to searchd and exchange versions - uint uServerVersion; - uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); - int iSocket = -1; - char * pError = NULL; - do - { - iSocket = socket ( iDomain, SOCK_STREAM, 0 ); - if ( iSocket == -1 ) - { - pError = "Failed to create client socket"; - break; - } - - if ( connect ( iSocket, pSockaddr, iSockaddrSize ) == -1) - { - pError = "Failed to connect to searchd"; - break; - } - - if ( !sphRecv ( iSocket, (char *)&uServerVersion, sizeof(uServerVersion) ) ) - { - pError = "Failed to receive searchd version"; - break; - } - - if ( !sphSend ( iSocket, (char *)&uClientVersion, sizeof(uClientVersion) ) ) - { - pError = "Failed to send client version"; - break; - } - } - while(0); - - // fixme: compare versions? - - if ( pError ) - { - char sError[1024]; - snprintf ( sError, sizeof(sError), "%s [%d] %s", Format(), errno, strerror(errno) ); - my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); - - if ( iSocket != -1 ) - close ( iSocket ); - - return -1; - } - - return iSocket; -} - -struct CSphResponse -{ - char * m_pBuffer; - char * m_pBody; - - CSphResponse () - : m_pBuffer ( NULL ) - , m_pBody ( NULL ) - {} - - CSphResponse ( DWORD uSize ) - : m_pBody ( NULL ) - { - m_pBuffer = new char[uSize]; - } - - ~CSphResponse () - { - SafeDeleteArray ( m_pBuffer ); - } - - static CSphResponse * Read ( int iSocket, int iClientVersion ); -}; - -CSphResponse * -CSphResponse::Read ( int iSocket, int iClientVersion ) -{ - char sHeader[8]; - if ( !sphRecv ( iSocket, sHeader, sizeof(sHeader) ) ) - return NULL; - - int iStatus = ntohs ( sphUnalignedRead ( *(short int *) &sHeader[0] ) ); - int iVersion = ntohs ( sphUnalignedRead ( *(short int *) &sHeader[2] ) ); - DWORD uLength = ntohl ( sphUnalignedRead ( *(DWORD *) &sHeader[4] ) ); - - if ( iVersion < iClientVersion ) // fixme: warn - ; - - if ( uLength <= SPHINXSE_MAX_ALLOC ) - { - CSphResponse * pResponse = new CSphResponse ( uLength ); - if ( !sphRecv ( iSocket, pResponse->m_pBuffer, uLength ) ) - { - SafeDelete ( pResponse ); - return NULL; - } - - pResponse->m_pBody = pResponse->m_pBuffer; - if ( iStatus != SEARCHD_OK ) - { - DWORD uSize = ntohl ( *(DWORD *)pResponse->m_pBuffer ); - if ( iStatus == SEARCHD_WARNING ) - pResponse->m_pBody += uSize; // fixme: report the warning somehow - else - { - char * sMessage = sphDup ( pResponse->m_pBuffer + sizeof(DWORD), uSize ); - my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sMessage ); - SafeDelete ( sMessage ); - SafeDelete ( pResponse ); - return NULL; - } - } - return pResponse; - } - return NULL; -} - -/// udf - -extern "C" -{ - my_bool sphinx_snippets_init ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sMessage ); - void sphinx_snippets_deinit ( UDF_INIT * pUDF ); - char * sphinx_snippets ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sResult, unsigned long * pLength, char * pIsNull, char * sError ); -}; - -#define MAX_MESSAGE_LENGTH 255 -#define MAX_RESULT_LENGTH 255 - -struct CSphSnippets -{ - CSphUrl m_tUrl; - CSphResponse * m_pResponse; - - int m_iBeforeMatch; - int m_iAfterMatch; - int m_iChunkSeparator; - int m_iLimit; - int m_iAround; - int m_iFlags; - - CSphSnippets() - : m_pResponse(NULL) - , m_iBeforeMatch(0) - , m_iAfterMatch(0) - , m_iChunkSeparator(0) - // defaults - , m_iLimit(256) - , m_iAround(5) - , m_iFlags(1) - { - } - - ~CSphSnippets() - { - SafeDelete ( m_pResponse ); - } -}; - -#define KEYWORD(NAME) else if ( strncmp ( NAME, pArgs->attributes[i], pArgs->attribute_lengths[i] ) == 0 ) - -#define CHECK_TYPE(TYPE) \ - if ( pArgs->arg_type[i] != TYPE ) \ - { \ - snprintf ( sMessage, MAX_MESSAGE_LENGTH, \ - "%.*s argument must be a string", \ - (int)pArgs->attribute_lengths[i], \ - pArgs->attributes[i] ); \ - bFail = true; \ - break; \ - } \ - if ( TYPE == STRING_RESULT && !pArgs->args[i] ) \ - { \ - snprintf ( sMessage, MAX_MESSAGE_LENGTH, \ - "%.*s argument must be constant (and not NULL)", \ - (int)pArgs->attribute_lengths[i], \ - pArgs->attributes[i] ); \ - bFail = true; \ - break; \ - } - -#define STRING CHECK_TYPE(STRING_RESULT) -#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 ) -{ - if ( pArgs->arg_count < 3 ) - { - strncpy ( sMessage, "insufficient arguments", MAX_MESSAGE_LENGTH ); - return 1; - } - - bool bFail = false; - CSphSnippets * pOpts = new CSphSnippets; - for ( uint i = 0; i < pArgs->arg_count; i++ ) - { - if ( i < 3 ) - { - if ( pArgs->arg_type[i] != STRING_RESULT ) - { - strncpy ( sMessage, "first three arguments must be of string type", MAX_MESSAGE_LENGTH ); - bFail = true; - break; - } - } - KEYWORD("sphinx") - { - STRING; - if ( !pOpts->m_tUrl.Parse ( pArgs->args[i], pArgs->lengths[i] ) ) - { - strncpy ( sMessage, "failed to parse connection string", MAX_MESSAGE_LENGTH ); - bFail = true; - break; - } - } - KEYWORD("before_match") { STRING; pOpts->m_iBeforeMatch = i; } - KEYWORD("after_match") { STRING; pOpts->m_iAfterMatch = i; } - KEYWORD("chunk_separator") { STRING; pOpts->m_iChunkSeparator = i; } - KEYWORD("limit") { INT; pOpts->m_iLimit = iValue; } - KEYWORD("around") { INT; pOpts->m_iAround = iValue; } - KEYWORD("exact_phrase") { INT; if ( iValue ) pOpts->m_iFlags |= 2; } - KEYWORD("single_passage") { INT; if ( iValue ) pOpts->m_iFlags |= 4; } - KEYWORD("use_boundaries") { INT; if ( iValue ) pOpts->m_iFlags |= 8; } - KEYWORD("weight_order") { INT; if ( iValue ) pOpts->m_iFlags |= 16; } - else - { - snprintf ( sMessage, MAX_MESSAGE_LENGTH, "unrecognized argument: %.*s", - (int)pArgs->attribute_lengths[i], pArgs->attributes[i] ); - bFail = true; - break; - } - } - - if ( bFail ) - { - SafeDelete ( pOpts ); - return 1; - } - pUDF->ptr = (char *)pOpts; - return 0; -} - -#undef STRING -#undef INT -#undef KEYWORD -#undef CHECK_TYPE - -#define ARG(i) pArgs->args[i], pArgs->lengths[i] -#define ARG_LEN(VAR, LEN) ( VAR ? pArgs->lengths[VAR] : LEN ) - -#define SEND_STRING(INDEX, DEFAULT) \ - if ( INDEX ) \ - tBuffer.SendString ( ARG(INDEX) ); \ - else \ - tBuffer.SendString ( DEFAULT, sizeof(DEFAULT) - 1 ); - - -char * sphinx_snippets ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sResult, unsigned long * pLength, char * pIsNull, char * pError ) -{ - CSphSnippets * pOpts = (CSphSnippets *)pUDF->ptr; - assert ( pOpts ); - - if ( !pArgs->args[0] || !pArgs->args[1] || !pArgs->args[2] ) - { - *pIsNull = 1; - return sResult; - } - - const int iSize = - 8 + // header - 8 + - 4 + pArgs->lengths[1] + // index - 4 + pArgs->lengths[2] + // words - 4 + ARG_LEN ( pOpts->m_iBeforeMatch, 3 ) + - 4 + ARG_LEN ( pOpts->m_iAfterMatch, 4 ) + - 4 + ARG_LEN ( pOpts->m_iChunkSeparator, 5 ) + - 12 + - 4 + pArgs->lengths[0]; // document - - CSphBuffer tBuffer(iSize); - - tBuffer.SendWord ( SEARCHD_COMMAND_EXCERPT ); - tBuffer.SendWord ( VER_COMMAND_EXCERPT ); - tBuffer.SendDword ( iSize - 8 ); - - tBuffer.SendDword ( 0 ); - tBuffer.SendDword ( pOpts->m_iFlags ); - - tBuffer.SendString ( ARG(1) ); // index - tBuffer.SendString ( ARG(2) ); // words - - SEND_STRING ( pOpts->m_iBeforeMatch, "" ); - SEND_STRING ( pOpts->m_iAfterMatch, "" ); - SEND_STRING ( pOpts->m_iChunkSeparator, " ... " ); - - tBuffer.SendInt ( pOpts->m_iLimit ); - tBuffer.SendInt ( pOpts->m_iAround ); - - // single document - tBuffer.SendInt ( 1 ); - tBuffer.SendString ( ARG(0) ); - - int iSocket = -1; - do - { - if ( !tBuffer.Finalize() ) - { - my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: failed to build request" ); - break; - } - - iSocket = pOpts->m_tUrl.Connect(); - if ( iSocket == -1 ) break; - if ( !sphSend ( iSocket, tBuffer.Ptr(), iSize, sphReportErrors ) ) break; - - CSphResponse * pResponse = CSphResponse::Read ( iSocket, 0x100 ); - if ( !pResponse ) break; - - close ( iSocket ); - pOpts->m_pResponse = pResponse; - *pLength = ntohl( *(DWORD *)pResponse->m_pBody ); - return pResponse->m_pBody + sizeof(DWORD); - } - while(0); - - if ( iSocket != -1 ) - close ( iSocket ); - - *pError = 1; - return sResult; -} - -#undef SEND_STRING -#undef ARG_LEN -#undef ARG - -void sphinx_snippets_deinit ( UDF_INIT * pUDF ) -{ - CSphSnippets * pOpts = (CSphSnippets *)pUDF->ptr; - SafeDelete ( pOpts ); -} - -// -// $Id$ -// +// +// $Id: snippets_udf.cc 4505 2014-01-22 15:16:21Z deogar $ +// + +// +// 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 +// it under the terms of the GNU General Public License. You should have +// received a copy of the GPL license along with this program; if you +// did not, you can find it at http://www.gnu.org/ +// + +#include +#include +#include + +#include +#include + +#include + +#if MYSQL_VERSION_ID>=50515 +#include "sql_class.h" +#include "sql_array.h" +#elif MYSQL_VERSION_ID>50100 +#include "mysql_priv.h" +#include +#else +#include "../mysql_priv.h" +#endif + +#include +#include + +#if MYSQL_VERSION_ID>=50120 +typedef uchar byte; +#endif + +/// partially copy-pasted stuff that should be moved elsewhere + +#if UNALIGNED_RAM_ACCESS + +/// pass-through wrapper +template < typename T > inline T sphUnalignedRead ( const T & tRef ) +{ + return tRef; +} + +/// pass-through wrapper +template < typename T > void sphUnalignedWrite ( void * pPtr, const T & tVal ) +{ + *(T*)pPtr = tVal; +} + +#else + +/// unaligned read wrapper for some architectures (eg. SPARC) +template < typename T > +inline T sphUnalignedRead ( const T & tRef ) +{ + T uTmp; + byte * pSrc = (byte *) &tRef; + byte * pDst = (byte *) &uTmp; + for ( int i=0; i<(int)sizeof(T); i++ ) + *pDst++ = *pSrc++; + return uTmp; +} + +/// unaligned write wrapper for some architectures (eg. SPARC) +template < typename T > +void sphUnalignedWrite ( void * pPtr, const T & tVal ) +{ + byte * pDst = (byte *) pPtr; + byte * pSrc = (byte *) &tVal; + for ( int i=0; i<(int)sizeof(T); i++ ) + *pDst++ = *pSrc++; +} + +#endif + +#define SPHINXSE_MAX_ALLOC (16*1024*1024) + +#define SafeDelete(_arg) { if ( _arg ) delete ( _arg ); (_arg) = NULL; } +#define SafeDeleteArray(_arg) { if ( _arg ) delete [] ( _arg ); (_arg) = NULL; } + +#define Min(a,b) ((a)<(b)?(a):(b)) + +typedef unsigned int DWORD; + +inline DWORD sphF2DW ( float f ) { union { float f; uint32 d; } u; u.f = f; return u.d; } + +static char * sphDup ( const char * sSrc, int iLen=-1 ) +{ + if ( !sSrc ) + return NULL; + + if ( iLen<0 ) + iLen = strlen(sSrc); + + char * sRes = new char [ 1+iLen ]; + memcpy ( sRes, sSrc, iLen ); + sRes[iLen] = '\0'; + return sRes; +} + +static inline void sphShowErrno ( const char * sCall ) +{ + char sError[256]; + snprintf ( sError, sizeof(sError), "%s() failed: [%d] %s", sCall, errno, strerror(errno) ); + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sError ); +} + +static const bool sphReportErrors = true; + +static bool sphSend ( int iFd, const char * pBuffer, int iSize, bool bReportErrors = false ) +{ + assert ( pBuffer ); + assert ( iSize > 0 ); + + const int iResult = send ( iFd, pBuffer, iSize, 0 ); + if ( iResult!=iSize ) + { + if ( bReportErrors ) sphShowErrno("send"); + return false; + } + return true; +} + +static bool sphRecv ( int iFd, char * pBuffer, int iSize, bool bReportErrors = false ) +{ + assert ( pBuffer ); + assert ( iSize > 0 ); + + while ( iSize ) + { + const int iResult = recv ( iFd, pBuffer, iSize, 0 ); + if ( iResult > 0 ) + { + iSize -= iResult; + pBuffer += iSize; + } else if ( iResult==0 ) + { + if ( bReportErrors ) + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), "recv() failed: disconnected" ); + return false; + } else + { + if ( bReportErrors ) sphShowErrno("recv"); + return false; + } + } + return true; +} + +enum +{ + SPHINX_SEARCHD_PROTO = 1, + + SEARCHD_COMMAND_EXCERPT = 1, + + VER_COMMAND_EXCERPT = 0x104, +}; + +/// known answers +enum +{ + SEARCHD_OK = 0, ///< general success, command-specific reply follows + SEARCHD_ERROR = 1, ///< general failure, error message follows + SEARCHD_RETRY = 2, ///< temporary failure, error message follows, client should retry later + SEARCHD_WARNING = 3 ///< general success, warning message and command-specific reply follow +}; + +#define SPHINXSE_DEFAULT_SCHEME "sphinx" +#define SPHINXSE_DEFAULT_HOST "127.0.0.1" +#define SPHINXSE_DEFAULT_PORT 9312 +#define SPHINXSE_DEFAULT_INDEX "*" + +class CSphBuffer +{ +private: + bool m_bOverrun; + int m_iSize; + int m_iLeft; + char * m_pBuffer; + char * m_pCurrent; + +public: + explicit CSphBuffer ( const int iSize ) + : m_bOverrun ( false ) + , m_iSize ( iSize ) + , m_iLeft ( iSize ) + { + assert ( iSize > 0 ); + m_pBuffer = new char[iSize]; + m_pCurrent = m_pBuffer; + } + + ~CSphBuffer () + { + SafeDeleteArray ( m_pBuffer ); + } + + const char * Ptr() const { return m_pBuffer; } + + bool Finalize() + { + return !( m_bOverrun || m_iLeft!=0 || ( m_pCurrent - m_pBuffer )!=m_iSize ); + } + + void SendBytes ( const void * pBytes, int iBytes ); + + void SendWord ( short int v ) { v = ntohs(v); SendBytes ( &v, sizeof(v) ); } // NOLINT + void SendInt ( int v ) { v = ntohl(v); SendBytes ( &v, sizeof(v) ); } + void SendDword ( DWORD v ) { v = ntohl(v) ;SendBytes ( &v, sizeof(v) ); } + void SendUint64 ( ulonglong v ) { SendDword ( uint ( v>>32 ) ); SendDword ( uint ( v&0xFFFFFFFFUL ) ); } + void SendString ( const char * v ) { SendString ( v, strlen(v) ); } + void SendString ( const char * v, int iLen ) { SendDword(iLen); SendBytes ( v, iLen ); } + void SendFloat ( float v ) { SendDword ( sphF2DW(v) ); } +}; + +void CSphBuffer::SendBytes ( const void * pBytes, int iBytes ) +{ + if ( m_iLeft < iBytes ) + { + m_bOverrun = true; + return; + } + + memcpy ( m_pCurrent, pBytes, iBytes ); + + m_pCurrent += iBytes; + m_iLeft -= iBytes; +} + +struct CSphUrl +{ + char * m_sBuffer; + char * m_sFormatted; + + char * m_sScheme; + char * m_sHost; + char * m_sIndex; + + int m_iPort; + + CSphUrl() + : m_sBuffer ( NULL ) + , m_sFormatted ( NULL ) + , m_sScheme ( SPHINXSE_DEFAULT_SCHEME ) + , m_sHost ( SPHINXSE_DEFAULT_HOST ) + , m_sIndex ( SPHINXSE_DEFAULT_INDEX ) + , m_iPort ( SPHINXSE_DEFAULT_PORT ) + {} + + ~CSphUrl() + { + SafeDeleteArray ( m_sFormatted ); + SafeDeleteArray ( m_sBuffer ); + } + + bool Parse ( const char * sUrl, int iLen ); + int Connect(); + const char * Format(); +}; + +const char * CSphUrl::Format() +{ + if ( !m_sFormatted ) + { + int iSize = 15 + strlen(m_sHost) + strlen(m_sIndex); + m_sFormatted = new char [ iSize ]; + if ( m_iPort ) + snprintf ( m_sFormatted, iSize, "inet://%s:%d/%s", m_sHost, m_iPort, m_sIndex ); + else + snprintf ( m_sFormatted, iSize, "unix://%s/%s", m_sHost, m_sIndex ); + } + return m_sFormatted; +} + +// the following scheme variants are recognized +// +// inet://host/index +// inet://host:port/index +// unix://unix/domain/socket:index +// unix://unix/domain/socket +bool CSphUrl::Parse ( const char * sUrl, int iLen ) +{ + bool bOk = true; + while ( iLen ) + { + bOk = false; + + m_sBuffer = sphDup ( sUrl, iLen ); + m_sScheme = m_sBuffer; + + m_sHost = strstr ( m_sBuffer, "://" ); + if ( !m_sHost ) + break; + m_sHost[0] = '\0'; + m_sHost += 2; + + if ( !strcmp ( m_sScheme, "unix" ) ) + { + // unix-domain socket + m_iPort = 0; + if (!( m_sIndex = strrchr ( m_sHost, ':' ) )) + m_sIndex = SPHINXSE_DEFAULT_INDEX; + else + { + *m_sIndex++ = '\0'; + if ( !*m_sIndex ) + m_sIndex = SPHINXSE_DEFAULT_INDEX; + } + bOk = true; + break; + } + if ( strcmp ( m_sScheme, "sphinx" )!=0 && strcmp ( m_sScheme, "inet" )!=0 ) + break; + + // inet + m_sHost++; + char * sPort = strchr ( m_sHost, ':' ); + if ( sPort ) + { + *sPort++ = '\0'; + if ( *sPort ) + { + m_sIndex = strchr ( sPort, '/' ); + if ( m_sIndex ) + *m_sIndex++ = '\0'; + else + m_sIndex = SPHINXSE_DEFAULT_INDEX; + + m_iPort = atoi(sPort); + if ( !m_iPort ) + m_iPort = SPHINXSE_DEFAULT_PORT; + } + } else + { + m_sIndex = strchr ( m_sHost, '/' ); + if ( m_sIndex ) + *m_sIndex++ = '\0'; + else + m_sIndex = SPHINXSE_DEFAULT_INDEX; + } + + bOk = true; + break; + } + + return bOk; +} + +int CSphUrl::Connect() +{ + struct sockaddr_in sin; +#ifndef __WIN__ + struct sockaddr_un saun; +#endif + + int iDomain = 0; + int iSockaddrSize = 0; + struct sockaddr * pSockaddr = NULL; + + in_addr_t ip_addr; + + if ( m_iPort ) + { + iDomain = AF_INET; + iSockaddrSize = sizeof(sin); + pSockaddr = (struct sockaddr *) &sin; + + memset ( &sin, 0, sizeof(sin) ); + sin.sin_family = AF_INET; + sin.sin_port = htons ( m_iPort ); + + // resolve address + if ( (int)( ip_addr = inet_addr ( m_sHost ) )!=(int)INADDR_NONE ) + memcpy ( &sin.sin_addr, &ip_addr, sizeof(ip_addr) ); + else + { + int tmp_errno; + bool bError = false; + +#if MYSQL_VERSION_ID>=50515 + struct addrinfo *hp = NULL; + tmp_errno = getaddrinfo ( m_sHost, NULL, NULL, &hp ); + if ( !tmp_errno || !hp || !hp->ai_addr ) + { + bError = true; + if ( hp ) + freeaddrinfo ( hp ); + } +#else + struct hostent tmp_hostent, *hp; + char buff2 [ GETHOSTBYNAME_BUFF_SIZE ]; + hp = my_gethostbyname_r ( m_sHost, &tmp_hostent, buff2, sizeof(buff2), &tmp_errno ); + if ( !hp ) + { + my_gethostbyname_r_free(); + bError = true; + } +#endif + + if ( bError ) + { + char sError[256]; + my_snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", m_sHost ); + + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); + return -1; + } + +#if MYSQL_VERSION_ID>=50515 + memcpy ( &sin.sin_addr, hp->ai_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->ai_addrlen ) ); + freeaddrinfo ( hp ); +#else + memcpy ( &sin.sin_addr, hp->h_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); + my_gethostbyname_r_free(); +#endif + } + } else + { +#ifndef __WIN__ + iDomain = AF_UNIX; + iSockaddrSize = sizeof(saun); + pSockaddr = (struct sockaddr *) &saun; + + memset ( &saun, 0, sizeof(saun) ); + saun.sun_family = AF_UNIX; + strncpy ( saun.sun_path, m_sHost, sizeof(saun.sun_path)-1 ); +#else + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), "Unix-domain sockets are not supported on Windows" ); + return -1; +#endif + } + + // connect to searchd and exchange versions + uint uServerVersion; + uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); + int iSocket = -1; + char * pError = NULL; + do + { + iSocket = socket ( iDomain, SOCK_STREAM, 0 ); + if ( iSocket==-1 ) + { + pError = "Failed to create client socket"; + break; + } + + if ( connect ( iSocket, pSockaddr, iSockaddrSize )==-1 ) + { + pError = "Failed to connect to searchd"; + break; + } + + if ( !sphRecv ( iSocket, (char *)&uServerVersion, sizeof(uServerVersion) ) ) + { + pError = "Failed to receive searchd version"; + break; + } + + if ( !sphSend ( iSocket, (char *)&uClientVersion, sizeof(uClientVersion) ) ) + { + pError = "Failed to send client version"; + break; + } + } + while(0); + + // fixme: compare versions? + + if ( pError ) + { + char sError[1024]; + snprintf ( sError, sizeof(sError), "%s [%d] %s", Format(), errno, strerror(errno) ); + my_error ( ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), sError ); + + if ( iSocket!=-1 ) + close ( iSocket ); + + return -1; + } + + return iSocket; +} + +struct CSphResponse +{ + char * m_pBuffer; + char * m_pBody; + + CSphResponse () + : m_pBuffer ( NULL ) + , m_pBody ( NULL ) + {} + + explicit CSphResponse ( DWORD uSize ) + : m_pBody ( NULL ) + { + m_pBuffer = new char[uSize]; + } + + ~CSphResponse () + { + SafeDeleteArray ( m_pBuffer ); + } + + static CSphResponse * Read ( int iSocket, int iClientVersion ); +}; + +CSphResponse * +CSphResponse::Read ( int iSocket, int iClientVersion ) +{ + char sHeader[8]; + if ( !sphRecv ( iSocket, sHeader, sizeof(sHeader) ) ) + return NULL; + + int iStatus = ntohs ( sphUnalignedRead ( *(short int *) &sHeader[0] ) ); + int iVersion = ntohs ( sphUnalignedRead ( *(short int *) &sHeader[2] ) ); + DWORD uLength = ntohl ( sphUnalignedRead ( *(DWORD *) &sHeader[4] ) ); + + if ( iVersionm_pBuffer, uLength ) ) + { + SafeDelete ( pResponse ); + return NULL; + } + + pResponse->m_pBody = pResponse->m_pBuffer; + if ( iStatus!=SEARCHD_OK ) + { + DWORD uSize = ntohl ( *(DWORD *)pResponse->m_pBuffer ); + if ( iStatus==SEARCHD_WARNING ) + { + pResponse->m_pBody += uSize; // fixme: report the warning somehow + } else + { + char * sMessage = sphDup ( pResponse->m_pBuffer + sizeof(DWORD), uSize ); + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), sMessage ); + SafeDeleteArray ( sMessage ); + SafeDelete ( pResponse ); + return NULL; + } + } + return pResponse; + } + return NULL; +} + +/// udf + +extern "C" +{ + my_bool sphinx_snippets_init ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sMessage ); + void sphinx_snippets_deinit ( UDF_INIT * pUDF ); + char * sphinx_snippets ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sResult, unsigned long * pLength, char * pIsNull, char * sError ); +}; + +#define MAX_MESSAGE_LENGTH 255 +#define MAX_RESULT_LENGTH 255 + +struct CSphSnippets +{ + CSphUrl m_tUrl; + CSphResponse * m_pResponse; + + int m_iBeforeMatch; + int m_iAfterMatch; + int m_iChunkSeparator; + int m_iStripMode; + int m_iPassageBoundary; + int m_iLimit; + int m_iLimitWords; + int m_iLimitPassages; + int m_iAround; + int m_iPassageId; + int m_iFlags; + + CSphSnippets() + : m_pResponse(NULL) + , m_iBeforeMatch(0) + , m_iAfterMatch(0) + , m_iChunkSeparator(0) + , m_iStripMode(0) + , m_iPassageBoundary(0) + // defaults + , m_iLimit(256) + , m_iLimitWords(0) + , m_iLimitPassages(0) + , m_iAround(5) + , m_iPassageId(1) + , m_iFlags(1) + { + } + + ~CSphSnippets() + { + SafeDelete ( m_pResponse ); + } +}; + +#define KEYWORD(NAME) else if ( strncmp ( NAME, pArgs->attributes[i], pArgs->attribute_lengths[i] )==0 ) + +#define CHECK_TYPE(TYPE) \ + if ( pArgs->arg_type[i]!=TYPE ) \ + { \ + snprintf ( sMessage, MAX_MESSAGE_LENGTH, \ + "%.*s argument must be a string", \ + (int)pArgs->attribute_lengths[i], \ + pArgs->attributes[i] ); \ + bFail = true; \ + break; \ + } \ + if ( TYPE==STRING_RESULT && !pArgs->args[i] ) \ + { \ + snprintf ( sMessage, MAX_MESSAGE_LENGTH, \ + "%.*s argument must be constant (and not NULL)", \ + (int)pArgs->attribute_lengths[i], \ + pArgs->attributes[i] ); \ + bFail = true; \ + break; \ + } + +#define STRING CHECK_TYPE(STRING_RESULT) +#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 ) +{ + if ( pArgs->arg_count < 3 ) + { + strncpy ( sMessage, "insufficient arguments", MAX_MESSAGE_LENGTH ); + return 1; + } + + bool bFail = false; + CSphSnippets * pOpts = new CSphSnippets; + for ( uint i = 0; i < pArgs->arg_count; i++ ) + { + if ( i < 3 ) + { + if ( pArgs->arg_type[i]!=STRING_RESULT ) + { + strncpy ( sMessage, "first three arguments must be of string type", MAX_MESSAGE_LENGTH ); + bFail = true; + break; + } + } + KEYWORD("sphinx") + { + STRING; + if ( !pOpts->m_tUrl.Parse ( pArgs->args[i], pArgs->lengths[i] ) ) + { + strncpy ( sMessage, "failed to parse connection string", MAX_MESSAGE_LENGTH ); + bFail = true; + break; + } + } + KEYWORD("before_match") { STRING; pOpts->m_iBeforeMatch = i; } + KEYWORD("after_match") { STRING; pOpts->m_iAfterMatch = i; } + KEYWORD("chunk_separator") { STRING; pOpts->m_iChunkSeparator = i; } + KEYWORD("html_strip_mode") { STRING; pOpts->m_iStripMode = i; } + KEYWORD("passage_boundary") { STRING; pOpts->m_iPassageBoundary = i; } + + KEYWORD("limit") { INT; pOpts->m_iLimit = iValue; } + KEYWORD("limit_words") { INT; pOpts->m_iLimitWords = iValue; } + KEYWORD("limit_passages") { INT; pOpts->m_iLimitPassages = iValue; } + KEYWORD("around") { INT; pOpts->m_iAround = iValue; } + KEYWORD("start_passage_id") { INT; pOpts->m_iPassageId = iValue; } + + KEYWORD("exact_phrase") { INT; if ( iValue ) pOpts->m_iFlags |= 2; } + KEYWORD("single_passage") { INT; if ( iValue ) pOpts->m_iFlags |= 4; } + KEYWORD("use_boundaries") { INT; if ( iValue ) pOpts->m_iFlags |= 8; } + KEYWORD("weight_order") { INT; if ( iValue ) pOpts->m_iFlags |= 16; } + KEYWORD("query_mode") { INT; if ( iValue ) pOpts->m_iFlags |= 32; } + KEYWORD("force_all_words") { INT; if ( iValue ) pOpts->m_iFlags |= 64; } + KEYWORD("load_files") { INT; if ( iValue ) pOpts->m_iFlags |= 128; } + KEYWORD("allow_empty") { INT; if ( iValue ) pOpts->m_iFlags |= 256; } + KEYWORD("emit_zones") { INT; if ( iValue ) pOpts->m_iFlags |= 512; } + KEYWORD("load_files_scattered") { INT; if ( iValue ) pOpts->m_iFlags |= 1024; } + else + { + snprintf ( sMessage, MAX_MESSAGE_LENGTH, "unrecognized argument: %.*s", + (int)pArgs->attribute_lengths[i], pArgs->attributes[i] ); + bFail = true; + break; + } + } + + if ( bFail ) + { + SafeDelete ( pOpts ); + return 1; + } + pUDF->ptr = (char *)pOpts; + return 0; +} + +#undef STRING +#undef INT +#undef KEYWORD +#undef CHECK_TYPE + +#define ARG(i) pArgs->args[i], pArgs->lengths[i] +#define ARG_LEN(VAR, LEN) ( VAR ? pArgs->lengths[VAR] : LEN ) + +#define SEND_STRING(INDEX, DEFAULT) \ + if ( INDEX ) \ + tBuffer.SendString ( ARG(INDEX) ); \ + else \ + tBuffer.SendString ( DEFAULT, sizeof(DEFAULT) - 1 ); + + +char * sphinx_snippets ( UDF_INIT * pUDF, UDF_ARGS * pArgs, char * sResult, unsigned long * pLength, char * pIsNull, char * pError ) +{ + CSphSnippets * pOpts = (CSphSnippets *)pUDF->ptr; + assert ( pOpts ); + + if ( !pArgs->args[0] || !pArgs->args[1] || !pArgs->args[2] ) + { + *pIsNull = 1; + return sResult; + } + + const int iSize = 68 + + pArgs->lengths[1] + // index + pArgs->lengths[2] + // words + ARG_LEN ( pOpts->m_iBeforeMatch, 3 ) + + ARG_LEN ( pOpts->m_iAfterMatch, 4 ) + + ARG_LEN ( pOpts->m_iChunkSeparator, 5 ) + + ARG_LEN ( pOpts->m_iStripMode, 5 ) + + ARG_LEN ( pOpts->m_iPassageBoundary, 0 ) + + 4 + pArgs->lengths[0]; // document + + CSphBuffer tBuffer(iSize); + + tBuffer.SendWord ( SEARCHD_COMMAND_EXCERPT ); + tBuffer.SendWord ( VER_COMMAND_EXCERPT ); + tBuffer.SendDword ( iSize - 8 ); + + tBuffer.SendDword ( 0 ); + tBuffer.SendDword ( pOpts->m_iFlags ); + + tBuffer.SendString ( ARG(1) ); // index + tBuffer.SendString ( ARG(2) ); // words + + SEND_STRING ( pOpts->m_iBeforeMatch, "" ); + SEND_STRING ( pOpts->m_iAfterMatch, "" ); + SEND_STRING ( pOpts->m_iChunkSeparator, " ... " ); + + tBuffer.SendInt ( pOpts->m_iLimit ); + tBuffer.SendInt ( pOpts->m_iAround ); + + tBuffer.SendInt ( pOpts->m_iLimitPassages ); + tBuffer.SendInt ( pOpts->m_iLimitWords ); + tBuffer.SendInt ( pOpts->m_iPassageId ); + + SEND_STRING ( pOpts->m_iStripMode, "index" ); + SEND_STRING ( pOpts->m_iPassageBoundary, "" ); + + // single document + tBuffer.SendInt ( 1 ); + tBuffer.SendString ( ARG(0) ); + + int iSocket = -1; + do + { + if ( !tBuffer.Finalize() ) + { + my_error ( ER_QUERY_ON_FOREIGN_DATA_SOURCE, MYF(0), "INTERNAL ERROR: failed to build request" ); + break; + } + + iSocket = pOpts->m_tUrl.Connect(); + if ( iSocket==-1 ) break; + if ( !sphSend ( iSocket, tBuffer.Ptr(), iSize, sphReportErrors ) ) break; + + CSphResponse * pResponse = CSphResponse::Read ( iSocket, VER_COMMAND_EXCERPT ); + if ( !pResponse ) break; + + close ( iSocket ); + pOpts->m_pResponse = pResponse; + *pLength = ntohl ( *(DWORD *)pResponse->m_pBody ); + return pResponse->m_pBody + sizeof(DWORD); + } + while(0); + + if ( iSocket!=-1 ) + close ( iSocket ); + + *pError = 1; + return sResult; +} + +#undef SEND_STRING +#undef ARG_LEN +#undef ARG + +void sphinx_snippets_deinit ( UDF_INIT * pUDF ) +{ + CSphSnippets * pOpts = (CSphSnippets *)pUDF->ptr; + SafeDelete ( pOpts ); +} + +// +// $Id: snippets_udf.cc 4505 2014-01-22 15:16:21Z deogar $ +// diff --git a/sphinx.5.0.91.diff b/sphinx.5.0.91.diff new file mode 100644 index 00000000000..92ee9f7c618 --- /dev/null +++ b/sphinx.5.0.91.diff @@ -0,0 +1,400 @@ +diff -r 319c65835581 CMakeLists.txt +--- a/CMakeLists.txt Sun Jun 20 15:15:01 2010 +0400 ++++ b/CMakeLists.txt Sun Jun 20 15:59:31 2010 +0400 +@@ -70,6 +70,10 @@ + ADD_DEFINITIONS(-DHAVE_INNOBASE_DB) + ENDIF(WITH_INNOBASE_STORAGE_ENGINE) + ++IF(WITH_SPHINX_STORAGE_ENGINE) ++ ADD_DEFINITIONS(-DHAVE_SPHINX_DB) ++ENDIF(WITH_SPHINX_STORAGE_ENGINE) ++ + SET(localstatedir "C:\\mysql\\data") + CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh + ${CMAKE_SOURCE_DIR}/support-files/my-huge.ini @ONLY) +diff -r 319c65835581 configure.in +--- a/configure.in Sun Jun 20 15:15:01 2010 +0400 ++++ b/configure.in Sun Jun 20 15:59:31 2010 +0400 +@@ -60,6 +60,7 @@ + sinclude(config/ac-macros/ha_berkeley.m4) + sinclude(config/ac-macros/ha_blackhole.m4) + sinclude(config/ac-macros/ha_example.m4) ++sinclude(config/ac-macros/ha_sphinx.m4) + sinclude(config/ac-macros/ha_federated.m4) + sinclude(config/ac-macros/ha_innodb.m4) + sinclude(config/ac-macros/ha_ndbcluster.m4) +@@ -2696,6 +2697,7 @@ + MYSQL_CHECK_BDB + MYSQL_CHECK_INNODB + MYSQL_CHECK_EXAMPLEDB ++MYSQL_CHECK_SPHINXDB + MYSQL_CHECK_ARCHIVEDB + MYSQL_CHECK_CSVDB + MYSQL_CHECK_BLACKHOLEDB +diff -r 319c65835581 libmysqld/Makefile.am +--- a/libmysqld/Makefile.am Sun Jun 20 15:15:01 2010 +0400 ++++ b/libmysqld/Makefile.am Sun Jun 20 15:59:31 2010 +0400 +@@ -29,6 +29,7 @@ + -I$(top_builddir)/include -I$(top_srcdir)/include \ + -I$(top_builddir)/sql -I$(top_srcdir)/sql \ + -I$(top_srcdir)/sql/examples \ ++ -I$(top_srcdir)/sql/sphinx \ + -I$(top_srcdir)/regex \ + $(openssl_includes) @ZLIB_INCLUDES@ + +@@ -39,6 +40,7 @@ + libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ + my_time.c + sqlexamplessources = ha_example.cc ha_tina.cc ++sqlsphinxsources = ha_sphinx.cc + + noinst_HEADERS = embedded_priv.h emb_qcache.h + +@@ -67,7 +69,7 @@ + parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ + ha_blackhole.cc ha_archive.cc my_user.c + +-libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) ++libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) $(sqlsphinxsources) + libmysqld_a_SOURCES= + + # automake misses these +@@ -147,12 +149,16 @@ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ + done; \ ++ for f in $(sqlsphinxsources); do \ ++ rm -f $$f; \ ++ @LN_CP_F@ $(top_srcdir)/sql/sphinx/$$f $$f; \ ++ done; \ + rm -f client_settings.h; \ + @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h + + + clean-local: +- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ ++ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) $(sqlsphinxsources) | sed "s;\.lo;.c;g"` \ + $(top_srcdir)/linked_libmysqld_sources; \ + rm -f client_settings.h + +diff -r 319c65835581 sql/CMakeLists.txt +--- a/sql/CMakeLists.txt Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/CMakeLists.txt Sun Jun 20 15:59:31 2010 +0400 +@@ -50,6 +50,7 @@ + filesort.cc gstream.cc ha_blackhole.cc + ha_archive.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc + ha_innodb.cc ha_federated.cc ha_berkeley.cc ++ sphinx/ha_sphinx.cc + handler.cc hash_filo.cc hash_filo.h + hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc + item_create.cc item_func.cc item_geofunc.cc item_row.cc +diff -r 319c65835581 sql/Makefile.am +--- a/sql/Makefile.am Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/Makefile.am Sun Jun 20 15:59:31 2010 +0400 +@@ -68,6 +68,7 @@ + sql_array.h sql_cursor.h \ + examples/ha_example.h ha_archive.h \ + examples/ha_tina.h ha_blackhole.h \ ++ sphinx/ha_sphinx.h \ + ha_federated.h + mysqld_SOURCES = sql_lex.cc sql_handler.cc \ + item.cc item_sum.cc item_buff.cc item_func.cc \ +@@ -105,6 +106,7 @@ + sp_cache.cc parse_file.cc sql_trigger.cc \ + examples/ha_example.cc ha_archive.cc \ + examples/ha_tina.cc ha_blackhole.cc \ ++ sphinx/ha_sphinx.cc \ + ha_federated.cc + + gen_lex_hash_SOURCES = gen_lex_hash.cc +@@ -175,6 +177,10 @@ + udf_example_la_SOURCES= udf_example.c + udf_example_la_LDFLAGS= -module -rpath $(pkglibdir) + ++pkglib_LTLIBRARIES = sphinx/sphinx.la ++sphinx_sphinx_la_SOURCES = sphinx/snippets_udf.cc ++sphinx_sphinx_la_LDFLAGS = -module ++ + + # Don't update the files from bitkeeper + %::SCCS/s.% +diff -r 319c65835581 sql/handler.cc +--- a/sql/handler.cc Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/handler.cc Sun Jun 20 15:59:31 2010 +0400 +@@ -77,6 +77,15 @@ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + HTON_NO_FLAGS }; + #endif ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++extern handlerton sphinx_hton; ++#else ++handlerton sphinx_hton = { "SPHINX", SHOW_OPTION_NO, "SPHINX storage engine", ++ DB_TYPE_SPHINX_DB, NULL, 0, 0, NULL, NULL, ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ++ HTON_NO_FLAGS }; ++#endif + #ifdef HAVE_INNOBASE_DB + #include "ha_innodb.h" + extern handlerton innobase_hton; +@@ -141,6 +150,7 @@ + &example_hton, + &archive_hton, + &tina_hton, ++ &sphinx_hton, + &ndbcluster_hton, + &federated_hton, + &myisammrg_hton, +@@ -342,6 +352,12 @@ + return new (alloc) ha_tina(table); + return NULL; + #endif ++#ifdef HAVE_SPHINX_DB ++ case DB_TYPE_SPHINX_DB: ++ if (have_sphinx_db == SHOW_OPTION_YES) ++ return new (alloc) ha_sphinx(table); ++ return NULL; ++#endif + #ifdef HAVE_NDBCLUSTER_DB + case DB_TYPE_NDBCLUSTER: + if (have_ndbcluster == SHOW_OPTION_YES) +diff -r 319c65835581 sql/handler.h +--- a/sql/handler.h Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/handler.h Sun Jun 20 15:59:31 2010 +0400 +@@ -186,8 +186,9 @@ + DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, + DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER, + DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB, +- DB_TYPE_FEDERATED_DB, ++ DB_TYPE_FEDERATED_DB, + DB_TYPE_BLACKHOLE_DB, ++ DB_TYPE_SPHINX_DB, + DB_TYPE_DEFAULT // Must be last + }; + +diff -r 319c65835581 sql/mysql_priv.h +--- a/sql/mysql_priv.h Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/mysql_priv.h Sun Jun 20 15:59:31 2010 +0400 +@@ -1462,6 +1462,12 @@ + #else + extern SHOW_COMP_OPTION have_csv_db; + #endif ++#ifdef HAVE_SPHINX_DB ++extern handlerton sphinx_hton; ++#define have_sphinx_db sphinx_hton.state ++#else ++extern SHOW_COMP_OPTION have_sphinx_db; ++#endif + #ifdef HAVE_FEDERATED_DB + extern handlerton federated_hton; + #define have_federated_db federated_hton.state +diff -r 319c65835581 sql/mysqld.cc +--- a/sql/mysqld.cc Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/mysqld.cc Sun Jun 20 15:59:31 2010 +0400 +@@ -36,6 +36,10 @@ + #include + #endif + ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++#endif ++ + #ifdef HAVE_INNOBASE_DB + #define OPT_INNODB_DEFAULT 1 + #else +@@ -6721,6 +6725,13 @@ + #ifdef COMMUNITY_SERVER + {"Uptime_since_flush_status",(char*) 0, SHOW_FLUSHTIME}, + #endif ++#ifdef HAVE_SPHINX_DB ++ {"sphinx_total", (char *)sphinx_showfunc_total, SHOW_SPHINX_FUNC}, ++ {"sphinx_total_found", (char *)sphinx_showfunc_total_found, SHOW_SPHINX_FUNC}, ++ {"sphinx_time", (char *)sphinx_showfunc_time, SHOW_SPHINX_FUNC}, ++ {"sphinx_word_count", (char *)sphinx_showfunc_word_count, SHOW_SPHINX_FUNC}, ++ {"sphinx_words", (char *)sphinx_showfunc_words, SHOW_SPHINX_FUNC}, ++#endif + {NullS, NullS, SHOW_LONG} + }; + +@@ -6964,6 +6975,11 @@ + #else + have_csv_db= SHOW_OPTION_NO; + #endif ++#ifdef HAVE_SPHINX_DB ++ have_sphinx_db= SHOW_OPTION_YES; ++#else ++ have_sphinx_db= SHOW_OPTION_NO; ++#endif + #ifdef HAVE_NDBCLUSTER_DB + have_ndbcluster=SHOW_OPTION_DISABLED; + #else +@@ -8087,6 +8103,7 @@ + #undef have_example_db + #undef have_archive_db + #undef have_csv_db ++#undef have_sphinx_db + #undef have_federated_db + #undef have_partition_db + #undef have_blackhole_db +@@ -8097,6 +8114,7 @@ + SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; ++SHOW_COMP_OPTION have_sphinx_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; + SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO; +diff -r 319c65835581 sql/set_var.cc +--- a/sql/set_var.cc Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/set_var.cc Sun Jun 20 15:59:31 2010 +0400 +@@ -913,6 +913,7 @@ + {"have_profiling", (char*) &have_profiling, SHOW_HAVE}, + {"have_crypt", (char*) &have_crypt, SHOW_HAVE}, + {"have_csv", (char*) &have_csv_db, SHOW_HAVE}, ++ {"have_sphinx", (char*) &have_sphinx_db, SHOW_HAVE}, + {"have_dynamic_loading", (char*) &have_dlopen, SHOW_HAVE}, + {"have_example_engine", (char*) &have_example_db, SHOW_HAVE}, + {"have_federated_engine", (char*) &have_federated_db, SHOW_HAVE}, +diff -r 319c65835581 sql/sql_lex.h +--- a/sql/sql_lex.h Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/sql_lex.h Sun Jun 20 15:59:31 2010 +0400 +@@ -57,6 +57,7 @@ + SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS, + SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS, + SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_NDBCLUSTER_STATUS, SQLCOM_SHOW_MUTEX_STATUS, ++ SQLCOM_SHOW_SPHINX_STATUS, + SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT, + SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS, + SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS, +diff -r 319c65835581 sql/sql_parse.cc +--- a/sql/sql_parse.cc Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/sql_parse.cc Sun Jun 20 15:59:31 2010 +0400 +@@ -24,6 +24,9 @@ + #ifdef HAVE_INNOBASE_DB + #include "ha_innodb.h" + #endif ++#ifdef HAVE_SPHINX_DB ++#include "sphinx/ha_sphinx.h" ++#endif + + #ifdef HAVE_NDBCLUSTER_DB + #include "ha_ndbcluster.h" +@@ -3166,6 +3169,15 @@ + break; + } + #endif ++#ifdef HAVE_SPHINX_DB ++ case SQLCOM_SHOW_SPHINX_STATUS: ++ { ++ if (check_global_access(thd, SUPER_ACL)) ++ goto error; ++ res = sphinx_show_status(thd); ++ break; ++ } ++#endif + #ifdef HAVE_REPLICATION + case SQLCOM_LOAD_MASTER_TABLE: + { +diff -r 319c65835581 sql/sql_show.cc +--- a/sql/sql_show.cc Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/sql_show.cc Sun Jun 20 15:59:31 2010 +0400 +@@ -1500,6 +1500,16 @@ + value= (char*) var->value_ptr(thd, value_type, &null_lex_str); + charset= var->charset(thd); + } ++ #ifdef HAVE_SPHINX_DB ++ else if (show_type == SHOW_SPHINX_FUNC) ++ { ++ SHOW_VAR var; ++ ((int (*)(THD *, SHOW_VAR *, char *))value)(thd, &var, buff); ++ ++ value = var.value; ++ show_type = var.type; ++ } ++ #endif /* HAVE_SPHINX_DB */ + + pos= end= buff; + switch (show_type) { +diff -r 319c65835581 sql/sql_yacc.yy +--- a/sql/sql_yacc.yy Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/sql_yacc.yy Sun Jun 20 15:59:31 2010 +0400 +@@ -8342,6 +8342,9 @@ + case DB_TYPE_INNODB: + Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; + break; ++ case DB_TYPE_SPHINX_DB: ++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; ++ break; + default: + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); + MYSQL_YYABORT; +diff -r 319c65835581 sql/sql_yacc.cc +--- a/sql/sql_yacc.cc Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/sql_yacc.cc Sun Jun 20 15:59:31 2010 +0400 +@@ -27003,6 +27003,9 @@ + case DB_TYPE_INNODB: + Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; + break; ++ case DB_TYPE_SPHINX_DB: ++ Lex->sql_command = SQLCOM_SHOW_SPHINX_STATUS; ++ break; + default: + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); + MYSQL_YYABORT; +diff -r 319c65835581 sql/structs.h +--- a/sql/structs.h Sun Jun 20 15:15:01 2010 +0400 ++++ b/sql/structs.h Sun Jun 20 15:59:31 2010 +0400 +@@ -194,6 +194,9 @@ + SHOW_SSL_CTX_SESS_TIMEOUTS, SHOW_SSL_CTX_SESS_CACHE_FULL, + SHOW_SSL_GET_CIPHER_LIST, + #endif /* HAVE_OPENSSL */ ++#ifdef HAVE_SPHINX_DB ++ SHOW_SPHINX_FUNC, ++#endif + SHOW_NET_COMPRESSION, + SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS, + SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG, +diff -r 319c65835581 win/configure.js +--- a/win/configure.js Sun Jun 20 15:15:01 2010 +0400 ++++ b/win/configure.js Sun Jun 20 15:59:31 2010 +0400 +@@ -45,6 +45,7 @@ + case "WITH_EXAMPLE_STORAGE_ENGINE": + case "WITH_FEDERATED_STORAGE_ENGINE": + case "WITH_INNOBASE_STORAGE_ENGINE": ++ case "WITH_SPHINX_STORAGE_ENGINE": + case "__NT__": + case "DISABLE_GRANT_OPTIONS": + case "EMBED_MANIFESTS": +--- mysql-5.0.67/config/ac-macros/ha_sphinx.m4 1970-01-01 10:00:00.000000000 +1000 ++++ mysql-5.0.67-sphinx/config/ac-macros/ha_sphinx.m4 2009-02-14 09:15:48.000000000 +1000 +@@ -0,0 +1,30 @@ ++dnl --------------------------------------------------------------------------- ++dnl Macro: MYSQL_CHECK_EXAMPLEDB ++dnl Sets HAVE_SPHINX_DB if --with-sphinx-storage-engine is used ++dnl --------------------------------------------------------------------------- ++AC_DEFUN([MYSQL_CHECK_SPHINXDB], [ ++ AC_ARG_WITH([sphinx-storage-engine], ++ [ ++ --with-sphinx-storage-engine ++ Enable the Sphinx Storage Engine], ++ [sphinxdb="$withval"], ++ [sphinxdb=no]) ++ AC_MSG_CHECKING([for example storage engine]) ++ ++ case "$sphinxdb" in ++ yes ) ++ AC_DEFINE([HAVE_SPHINX_DB], [1], [Builds Sphinx Engine]) ++ AC_MSG_RESULT([yes]) ++ [sphinxdb=yes] ++ ;; ++ * ) ++ AC_MSG_RESULT([no]) ++ [sphinxdb=no] ++ ;; ++ esac ++ ++]) ++dnl --------------------------------------------------------------------------- ++dnl END OF MYSQL_CHECK_EXAMPLE SECTION ++dnl --------------------------------------------------------------------------- ++ From d929342b0f8d5a85aac4e76486b0ff2aff7ca54f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 2 Feb 2014 10:00:36 +0100 Subject: [PATCH 158/163] Merge the server part of MySQL WL#5522 - InnoDB transportable tablespaces. Syntax. Server support. Test cases. InnoDB bugfixes: * don't mess around with system sprintf's, always use my_error() for errors. * don't use InnoDB internal error codes where OS error codes are expected. * don't say "file not found", when it was. --- mysql-test/include/mix1.inc | 2 +- mysql-test/r/flush-innodb-notembedded.result | 34 + mysql-test/r/flush-innodb.result | 294 ++++ .../suite/innodb/include/innodb-util.pl | 126 ++ .../innodb/r/innodb-alter-discard.result | 21 + .../suite/innodb/r/innodb-bug-14068765.result | 42 + .../suite/innodb/r/innodb-bug-14084530.result | 31 + .../suite/innodb/r/innodb-wl5522-1.result | 811 +++++++++ .../innodb/r/innodb-wl5522-debug-zip.result | 580 +++++++ .../suite/innodb/r/innodb-wl5522-debug.result | 925 ++++++++++ .../suite/innodb/r/innodb-wl5522-zip.result | 503 ++++++ .../suite/innodb/r/innodb-wl5522.result | 1033 ++++++++++++ .../suite/innodb/t/innodb-alter-discard.test | 46 + .../suite/innodb/t/innodb-bug-14068765.test | 73 + .../suite/innodb/t/innodb-bug-14084530.test | 52 + .../suite/innodb/t/innodb-wl5522-1.test | 952 +++++++++++ .../innodb/t/innodb-wl5522-debug-zip.test | 758 +++++++++ .../suite/innodb/t/innodb-wl5522-debug.test | 1494 +++++++++++++++++ .../suite/innodb/t/innodb-wl5522-zip.test | 544 ++++++ mysql-test/suite/innodb/t/innodb-wl5522.test | 884 ++++++++++ .../perfschema/r/digest_table_full.result | 2 +- .../perfschema/r/statement_digest.result | 74 +- .../r/statement_digest_consumers.result | 74 +- .../r/statement_digest_long_query.result | 4 +- mysql-test/t/flush-innodb-notembedded.test | 69 + mysql-test/t/flush-innodb.test | 469 ++++++ sql/handler.h | 7 + sql/lex.h | 1 + sql/share/errmsg-utf8.txt | 2 +- sql/sql_parse.cc | 11 + sql/sql_reload.cc | 81 +- sql/sql_reload.h | 1 + sql/sql_yacc.yy | 27 +- storage/innobase/handler/ha_innodb.cc | 37 +- storage/innobase/row/row0import.cc | 4 +- storage/xtradb/handler/ha_innodb.cc | 33 +- storage/xtradb/row/row0import.cc | 4 +- 37 files changed, 9960 insertions(+), 145 deletions(-) create mode 100644 mysql-test/r/flush-innodb-notembedded.result create mode 100644 mysql-test/suite/innodb/include/innodb-util.pl create mode 100644 mysql-test/suite/innodb/r/innodb-alter-discard.result create mode 100644 mysql-test/suite/innodb/r/innodb-bug-14068765.result create mode 100644 mysql-test/suite/innodb/r/innodb-bug-14084530.result create mode 100644 mysql-test/suite/innodb/r/innodb-wl5522-1.result create mode 100644 mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result create mode 100644 mysql-test/suite/innodb/r/innodb-wl5522-debug.result create mode 100644 mysql-test/suite/innodb/r/innodb-wl5522-zip.result create mode 100644 mysql-test/suite/innodb/r/innodb-wl5522.result create mode 100644 mysql-test/suite/innodb/t/innodb-alter-discard.test create mode 100644 mysql-test/suite/innodb/t/innodb-bug-14068765.test create mode 100644 mysql-test/suite/innodb/t/innodb-bug-14084530.test create mode 100644 mysql-test/suite/innodb/t/innodb-wl5522-1.test create mode 100644 mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test create mode 100644 mysql-test/suite/innodb/t/innodb-wl5522-debug.test create mode 100644 mysql-test/suite/innodb/t/innodb-wl5522-zip.test create mode 100644 mysql-test/suite/innodb/t/innodb-wl5522.test create mode 100644 mysql-test/t/flush-innodb-notembedded.test 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/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..cba2d4a56e6 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= MyISAM; +FLUSH TABLE t1 FOR EXPORT; +ERROR HY000: Storage engine MyISAM 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 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/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-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 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 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/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-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-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/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/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/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..4494ee94376 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= MyISAM; +--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 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/sql/handler.h b/sql/handler.h index 69b9c3e071e..c0746b37fbc 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -247,6 +247,13 @@ enum enum_alter_inplace_result { */ #define HA_CAN_FULLTEXT_EXT (1LL << 44) +/* + Storage engine supports table export using the + FLUSH TABLE FOR EXPORT statement. + */ +#define HA_CAN_EXPORT (1LL << 45) + + /* Set of all binlog flags. Currently only contain the capabilities flags. 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/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 2d061fc314c..8da5b3a5c12 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -6757,7 +6757,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'" diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f9bfa6d120b..ec4e873f8ec 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4232,6 +4232,17 @@ end_with_restore_list: my_ok(thd); break; } + else if (first_table && lex->type & 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_for_export(thd, all_tables)) + goto error; + my_ok(thd); + break; + } /* reload_acl_and_cache() will tell us if we are allowed to write to the diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index 5df5b0ab3f7..c7038b6522d 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -522,7 +522,7 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables) /* 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 @@ -552,6 +552,85 @@ error: } +/** + Prepare tables for export (transportable tablespaces) by + a) waiting until write transactions/DDL operations using these + tables have completed. + b) block new write operations/DDL operations on these tables. + + Once this is done, notify the storage engines using handler::extra(). + + Finally, enter LOCK TABLES mode, so that locks are held + until UNLOCK TABLES is executed. + + @param thd Thread handler + @param all_tables TABLE_LIST for tables to be exported + + @retval false Ok + @retval true Error +*/ + +bool flush_tables_for_export(THD *thd, TABLE_LIST *all_tables) +{ + Lock_tables_prelocking_strategy lock_tables_prelocking_strategy; + + /* + This is called from SQLCOM_FLUSH, the transaction has + been committed implicitly. + */ + + if (thd->locked_tables_mode) + { + my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0)); + return true; + } + + /* + Acquire SNW locks on tables to be exported. Don't acquire + global IX as this will make this statement incompatible + with FLUSH TABLES WITH READ LOCK. + */ + if (open_and_lock_tables(thd, all_tables, false, + MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK, + &lock_tables_prelocking_strategy)) + { + return true; + } + + // 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; + } + } + + // Notify the storage engines that the tables should be made ready for export. + for (TABLE_LIST *table_list= all_tables; table_list; + table_list= table_list->next_global) + { + handler *handler_file= table_list->table->file; + int error= handler_file->extra(HA_EXTRA_EXPORT); + if (error) + { + handler_file->print_error(error, MYF(0)); + return true; + } + } + + // Enter LOCKED TABLES mode. + if (thd->locked_tables_list.init_locked_tables(thd)) + return true; + thd->variables.option_bits|= OPTION_TABLE_LOCK; + + return false; +} + + /** Disable checkpoints for all handlers This is released in unlock_global_read_lock() diff --git a/sql/sql_reload.h b/sql/sql_reload.h index 33ca022dc14..554fe8ade4d 100644 --- a/sql/sql_reload.h +++ b/sql/sql_reload.h @@ -22,5 +22,6 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, TABLE_LIST *tables, int *write_to_binlog); bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables); +bool flush_tables_for_export(THD *thd, TABLE_LIST *all_tables); #endif diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index e13687530ee..e7045abf7d7 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -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 */ @@ -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_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 @@ -12779,11 +12780,11 @@ flush_options: YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO; } opt_table_list {} - opt_with_read_lock {} + opt_flush_lock {} | flush_options_list ; -opt_with_read_lock: +opt_flush_lock: /* empty */ {} | WITH READ_SYM LOCK_SYM optional_flush_tables_arguments { @@ -12796,6 +12797,25 @@ opt_with_read_lock: tables->open_type= OT_BASE_ONLY; /* Ignore temporary tables. */ } } + | FOR_SYM + { + if (Lex->query_tables == NULL) // Table list can't be empty + { + my_parse_error(ER(ER_NO_TABLES_USED)); + MYSQL_YYABORT; + } + } + EXPORT_SYM + { + TABLE_LIST *tables= Lex->query_tables; + Lex->type|= REFRESH_FOR_EXPORT; + 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. */ + } + } ; flush_options_list: @@ -14139,6 +14159,7 @@ keyword_sp: | EVERY_SYM {} | EXCHANGE_SYM {} | EXPANSION_SYM {} + | EXPORT_SYM {} | EXTENDED_SYM {} | EXTENT_SIZE_SYM {} | FAULTS_SYM {} diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index b5abc89601d..7febafb2324 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -2252,7 +2252,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) {} @@ -17090,7 +17090,6 @@ ib_senderrf( ib_uint32_t code, /*!< MySQL error code */ ...) /*!< Args */ { - char* str; va_list args; const char* format = innobase_get_err_msg(code); @@ -17104,48 +17103,24 @@ ib_senderrf( va_start(args, code); -#ifdef __WIN__ - int size = _vscprintf(format, args) + 1; - str = static_cast(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(malloc(BUFSIZ)); - my_vsnprintf(str, BUFSIZ, format, args); - } -#else - /* Use a fixed length string. */ - str = static_cast(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/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index b753574158a..c513320afc1 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/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/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 9f717524ce2..c18cab7510e 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -2544,7 +2544,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) {} @@ -18216,7 +18216,6 @@ ib_senderrf( ib_uint32_t code, /*!< MySQL error code */ ...) /*!< Args */ { - char* str; va_list args; const char* format = innobase_get_err_msg(code); @@ -18230,44 +18229,24 @@ ib_senderrf( va_start(args, code); -#ifdef __WIN__ - int size = _vscprintf(format, args) + 1; - str = static_cast(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(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/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); From fa11d613cfbaee23d48cabfb65435d83adee7818 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 2 Feb 2014 10:06:29 +0100 Subject: [PATCH 159/163] MySQL WL#5522 - InnoDB transportable tablespaces. Cleanups: * remove unused HA_EXTRA_EXPORT (can be added later if needed, e.g. for Aria) * clarify the meaning of HA_CAN_EXPORT * make all engines that support EXPORT to announce it * reduce code duplication --- include/my_base.h | 5 -- mysql-test/r/flush-innodb.result | 4 +- mysql-test/t/flush-innodb.test | 2 +- sql/handler.h | 4 +- sql/sql_parse.cc | 15 +--- sql/sql_reload.cc | 147 +++++++++---------------------- sql/sql_reload.h | 1 - sql/sql_yacc.yy | 39 ++++---- storage/archive/ha_archive.h | 2 +- storage/csv/ha_tina.h | 2 +- storage/myisam/ha_myisam.cc | 2 +- storage/myisammrg/ha_myisammrg.h | 2 +- 12 files changed, 73 insertions(+), 152 deletions(-) diff --git a/include/my_base.h b/include/my_base.h index 2880b52e6e2..fcad2fc1a80 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 diff --git a/mysql-test/r/flush-innodb.result b/mysql-test/r/flush-innodb.result index cba2d4a56e6..6a97d33225e 100644 --- a/mysql-test/r/flush-innodb.result +++ b/mysql-test/r/flush-innodb.result @@ -155,9 +155,9 @@ UNLOCK TABLES; DROP TABLE t1; # Test 6: Unsupported storage engines. # -CREATE TABLE t1(a INT) engine= MyISAM; +CREATE TABLE t1(a INT) engine= MEMORY; FLUSH TABLE t1 FOR EXPORT; -ERROR HY000: Storage engine MyISAM of the table `test`.`t1` doesn't have this option +ERROR HY000: Storage engine MEMORY of the table `test`.`t1` doesn't have this option DROP TABLE t1; # Connection con1 # Connection defalt diff --git a/mysql-test/t/flush-innodb.test b/mysql-test/t/flush-innodb.test index 4494ee94376..7a877b977ce 100644 --- a/mysql-test/t/flush-innodb.test +++ b/mysql-test/t/flush-innodb.test @@ -267,7 +267,7 @@ DROP TABLE t1; --echo # Test 6: Unsupported storage engines. --echo # -CREATE TABLE t1(a INT) engine= MyISAM; +CREATE TABLE t1(a INT) engine= MEMORY; --error ER_ILLEGAL_HA FLUSH TABLE t1 FOR EXPORT; DROP TABLE t1; diff --git a/sql/handler.h b/sql/handler.h index c0746b37fbc..0202fedb1eb 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -249,7 +249,9 @@ enum enum_alter_inplace_result { /* Storage engine supports table export using the - FLUSH TABLE FOR EXPORT statement. + FLUSH TABLE 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) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index ec4e873f8ec..221ed09c215 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4221,25 +4221,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; - } - else if (first_table && lex->type & 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_for_export(thd, all_tables)) - goto error; + my_ok(thd); break; } diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index c7038b6522d..bb3d5bb899a 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -407,7 +407,8 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, /** - Implementation of FLUSH TABLES WITH READ LOCK. + Implementation of FLUSH TABLES WITH READ LOCK + and FLUSH TABLES FOR EXPORT In brief: take exclusive locks, expel tables from the table cache, reopen the tables, enter the 'LOCKED TABLES' mode, @@ -496,27 +497,30 @@ 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; - - DEBUG_SYNC(thd,"flush_tables_with_read_lock_after_acquire_locks"); - - for (table_list= all_tables; table_list; - table_list= table_list->next_global) + if (thd->lex->type & REFRESH_READ_LOCK) { - /* 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; + /* + 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"); + + 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; + } } /* @@ -531,11 +535,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; /* @@ -552,85 +572,6 @@ error: } -/** - Prepare tables for export (transportable tablespaces) by - a) waiting until write transactions/DDL operations using these - tables have completed. - b) block new write operations/DDL operations on these tables. - - Once this is done, notify the storage engines using handler::extra(). - - Finally, enter LOCK TABLES mode, so that locks are held - until UNLOCK TABLES is executed. - - @param thd Thread handler - @param all_tables TABLE_LIST for tables to be exported - - @retval false Ok - @retval true Error -*/ - -bool flush_tables_for_export(THD *thd, TABLE_LIST *all_tables) -{ - Lock_tables_prelocking_strategy lock_tables_prelocking_strategy; - - /* - This is called from SQLCOM_FLUSH, the transaction has - been committed implicitly. - */ - - if (thd->locked_tables_mode) - { - my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0)); - return true; - } - - /* - Acquire SNW locks on tables to be exported. Don't acquire - global IX as this will make this statement incompatible - with FLUSH TABLES WITH READ LOCK. - */ - if (open_and_lock_tables(thd, all_tables, false, - MYSQL_OPEN_SKIP_SCOPED_MDL_LOCK, - &lock_tables_prelocking_strategy)) - { - return true; - } - - // 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; - } - } - - // Notify the storage engines that the tables should be made ready for export. - for (TABLE_LIST *table_list= all_tables; table_list; - table_list= table_list->next_global) - { - handler *handler_file= table_list->table->file; - int error= handler_file->extra(HA_EXTRA_EXPORT); - if (error) - { - handler_file->print_error(error, MYF(0)); - return true; - } - } - - // Enter LOCKED TABLES mode. - if (thd->locked_tables_list.init_locked_tables(thd)) - return true; - thd->variables.option_bits|= OPTION_TABLE_LOCK; - - return false; -} - - /** Disable checkpoints for all handlers This is released in unlock_global_read_lock() diff --git a/sql/sql_reload.h b/sql/sql_reload.h index 554fe8ade4d..33ca022dc14 100644 --- a/sql/sql_reload.h +++ b/sql/sql_reload.h @@ -22,6 +22,5 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, TABLE_LIST *tables, int *write_to_binlog); bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables); -bool flush_tables_for_export(THD *thd, TABLE_LIST *all_tables); #endif diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index e7045abf7d7..f8724943676 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1829,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_flush_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 @@ -12779,24 +12779,27 @@ flush_options: YYPS->m_lock_type= TL_READ_NO_INSERT; YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO; } - opt_table_list {} - opt_flush_lock {} + opt_table_list opt_flush_lock | flush_options_list ; 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 @@ -12804,18 +12807,8 @@ opt_flush_lock: my_parse_error(ER(ER_NO_TABLES_USED)); MYSQL_YYABORT; } - } - EXPORT_SYM - { - TABLE_LIST *tables= Lex->query_tables; Lex->type|= REFRESH_FOR_EXPORT; - 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. */ - } - } + } EXPORT_SYM ; flush_options_list: 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/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/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 6bedc5c07aa..4fb51e610bb 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -667,7 +667,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 | 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); } From 5e1d5d9bc0bf9ea776bffe6c4914a84be920c0b2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 2 Feb 2014 10:09:05 +0100 Subject: [PATCH 160/163] fixes: * roles.grant_proxy-5526 test for --embedded * gcc warning in Connect --- mysql-test/suite/roles/grant_proxy-5526.test | 1 + storage/connect/ha_connect.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/roles/grant_proxy-5526.test b/mysql-test/suite/roles/grant_proxy-5526.test index 8f5f8cf6843..eadc763b966 100644 --- a/mysql-test/suite/roles/grant_proxy-5526.test +++ b/mysql-test/suite/roles/grant_proxy-5526.test @@ -1,3 +1,4 @@ +--source include/not_embedded.inc # # MDEV-5526 Assertion `proxied_user->host.length' fails on GRANT PROXY ON # diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 706f29175d6..8584917b5ca 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -3882,7 +3882,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; From 6c9272f7d51c25e5ba6b78de0d34460ecbefdb51 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 3 Feb 2014 15:26:58 +0100 Subject: [PATCH 161/163] mysql 5.6 partitioning bugfix: doubly-reported error --- sql/ha_partition.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index cd15fa8b20f..672348a5c45 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -7887,7 +7887,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, errflag); + DBUG_VOID_RETURN; + } else if (error == HA_ERR_ROW_IN_WRONG_PARTITION) { /* Should only happen on DELETE or UPDATE! */ From 0b3d74e4031294721207e48bb38d1fd4f1b5c613 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 3 Feb 2014 15:27:03 +0100 Subject: [PATCH 162/163] WEIGHT_STRING fix: correct Item_func_weight_string::eq() method --- sql/item_strfunc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index a33f4910fd5..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 From 3b3a7a524e6a4def53aa98e93bd6e930df60eec3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 3 Feb 2014 22:28:35 +0100 Subject: [PATCH 163/163] test fixes --- mysql-test/r/information_schema-big.result | 6 +- mysql-test/t/information_schema-big.test | 4 +- .../tokudb_alter_table/r/hcad_all_add.result | 434 ++++++++++++++++++ 3 files changed, 440 insertions(+), 4 deletions(-) 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/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/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;